1
0
Fork 0

Stylish posts

master
Alex Kotov 2 years ago
parent 5f56a4c57f
commit 5828b51ba6
  1. 20
      app/views/profiles/show.html.erb

@ -2,10 +2,18 @@
<p><%= @profile.description %></p>
<% if @profile.posts.present? %>
<ul>
<% @profile.posts.each do |post| %>
<li><%= post.text %></li>
<% end %>
</ul>
<% @profile.posts.each do |post| %>
<div class="card mb-4">
<div class="card-body">
<p class="card-text">
<%= post.text %>
</p>
<p class="card-text">
<small class="text-muted">
<%= localize post.created_at, format: :short %>
</small>
</p>
</div>
</div>
<% end %>