Soc/app/views/blog_posts/index.html.erb

14 lines
297 B
Plaintext
Raw Normal View History

2023-10-05 18:46:09 +00:00
<h2><%= t(".blog_posts") %></h2>
<%= link_to t(".new"), new_blog_post_path if logged_in? %>
<% if @blog_posts.empty? %>
<p><%= t(".empty") %></p>
<% else %>
<ul id="blog_posts">
<% @blog_posts.each do |blog_post| %>
<li><%= render blog_post %></li>
<% end %>
</ul>
<% end %>