Sha256: cc9da8a2bbdf8e0c4bb9e251b5c1394680ac1af1791852198a775d7ad868fbeb
Contents?: true
Size: 858 Bytes
Versions: 4
Compression:
Stored size: 858 Bytes
Contents
<h1>Blog</h1> <%= form_tag '#', method: :get, class: 'inline-form' do %> <label>Search</label> <%= text_field_tag :search, params[:search], class: 'form-control inline-form' %> <% end %> <% @articles.each do |post| %> <div class="content"> <% unless post.image.nil? %> <div class="image-post" ><%= image_tag post.image.file %></div> <% end %> <div style="cursor: pointer;" onclick="window.location='/articles/<%= post.id.to_s %>';"> <h2 class="center"><%= post.title %></h2> <h6>Posted <%= post.created_at.strftime("%B %d") %></h6> <p><%=raw HTML_Truncator.truncate(post.content, 50) %></p> </div> <div><%= link_to 'Read More', article_path(post) %></div> <div class="tags"> <% post.tags.each do |tag| %> <%= link_to tag, articles_path(search: tag), class: 'btn btn-default btn-xs' %> <% end %> </div> </div> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems