Sha256: ff1e6933ffb0a4d899ac1dd21c20f18eafce8bf6ac78af99c22f82e66ae9753a
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
<p id="notice"><%= notice %></p> <h1>Posts</h1> <p><%= page_entries_info(@result_set, entry_name: "Posts") %></p> <%= form_tag(posts_path, method: "get") do %> <%= search_field_tag "query", params["query"] %> <%= submit_tag "Search" %> <% end %> <table> <thead> <tr> <th>Title</th> <th>Body</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @result_set.records.each do |record| %> <% post = record.source %> <tr> <td><%= record.highlight_html.html_safe %></td> <td> <% if record.snippet_html.blank? %> <%= post.body %> <% else %> <%= record.snippet_html.join("<br>").html_safe %> <% end %> </td> <td><%= link_to 'Show', post %></td> <td><%= link_to 'Edit', edit_post_path(post) %></td> <td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table> <br> <%= paginate(@result_set) %> <%= link_to 'New Post', new_post_path %>
Version data entries
3 entries across 3 versions & 1 rubygems