<% if authenticated? %> <%= link_to 'New Update', new_post_path %> <% else %> . <% end %>

Recent Updates

<% @posts.each do |post| %> <% if post.icon_image.attached? %> <%= image_tag post.icon_image %> <% else %> 🛸 <% end %> <%= time_ago_in_words(post.created_at) %> ago

<% if authenticated? %> | <%= link_to 'Edit', edit_post_path(post) %> <%= link_to 'Destroy', post_path(post), data: { turbo_method: :delete, turbo_confirm: "Are you sureee?" } %> <% else %> <% end %> <%= post.text %>
<% end %>