Catch render errors and display 'Couldn't find anything' instead of stacktrace
This commit is contained in:
parent
f96ed67cf0
commit
84cf537412
@ -1,6 +1,7 @@
|
|||||||
<h1>Results for "<%= params[:search_term] %>"</h1>
|
<h1>Results for "<%= params[:search_term] %>"</h1>
|
||||||
|
|
||||||
<ul class="courses-list">
|
<ul class="courses-list">
|
||||||
|
<% if @courses %>
|
||||||
<% @courses.each_with_index do |course| %>
|
<% @courses.each_with_index do |course| %>
|
||||||
<li class="course">
|
<li class="course">
|
||||||
<%= link_to crawlers_courses_crawler_show_detail_url(:title => course['title'], :detail_url => course['detail_url']) do %>
|
<%= link_to crawlers_courses_crawler_show_detail_url(:title => course['title'], :detail_url => course['detail_url']) do %>
|
||||||
@ -17,4 +18,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
Could not find anything... Please try again.
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<h1>Results for "<%= params[:search_term] %>"</h1>
|
<h1>Results for "<%= params[:search_term] %>"</h1>
|
||||||
|
|
||||||
<ul class="projects-list">
|
<ul class="projects-list">
|
||||||
|
<% if @projects %>
|
||||||
<% @projects.each_with_index do |project| %>
|
<% @projects.each_with_index do |project| %>
|
||||||
<li class="project">
|
<li class="project">
|
||||||
<%= link_to crawlers_projects_crawler_show_detail_url(:id => project['id'], :title => project['title']) do %>
|
<%= link_to crawlers_projects_crawler_show_detail_url(:id => project['id'], :title => project['title']) do %>
|
||||||
@ -17,4 +18,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
Could not find anything... Please try again.
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<h1>Results for "<%= params[:search_term] %>"</h1>
|
<h1>Results for "<%= params[:search_term] %>"</h1>
|
||||||
|
|
||||||
<ul class="theses-list">
|
<ul class="theses-list">
|
||||||
|
<% if @theses %>
|
||||||
<% @theses.each_with_index do |thesis| %>
|
<% @theses.each_with_index do |thesis| %>
|
||||||
<li class="thesis">
|
<li class="thesis">
|
||||||
<%= link_to crawlers_theses_crawler_show_detail_url(:id => thesis['id'], :title => thesis['title']) do %>
|
<%= link_to crawlers_theses_crawler_show_detail_url(:id => thesis['id'], :title => thesis['title']) do %>
|
||||||
@ -17,4 +18,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
Could not find anything... Please try again.
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user