index.html.erb 413 Bytes
Newer Older
1
2
3
4
5
<% if @results.any? %>
  <% @results.each do |result| %>
    <% if result.type == :course %>
      <%= render partial: 'shared/course', object: result.data %>
    <% elsif result.type == :instructor %>
Zach Perkins's avatar
Zach Perkins committed
6
      <%= render partial: 'shared/instructor', object: result.data %>
7
8
    <% end %>
  <% end %>
Zac Wood's avatar
Zac Wood committed
9
<% else %>
10
11
  <h1>Sorry, we couldn't find anything matching your search.</h1>
  <p>Please try again!</p>
Zac Wood's avatar
Zac Wood committed
12
<% end %>
Zac Wood's avatar
Zac Wood committed
13