diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 6010014..bff0767 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -5,7 +5,7 @@ class PostsController < ApplicationController def index @posts = Post.all.order(created_at: :desc) - @post = Post.find_by(params[:id]) +# @post = Post.find_by(params[:id]) end def show diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb index 5582267..52f8944 100644 --- a/app/views/posts/index.html.erb +++ b/app/views/posts/index.html.erb @@ -16,7 +16,7 @@ <%= image_tag post.icon_image %> <% else %> 🛸 - <% end %> <%= time_ago_in_words(@post.created_at) %> ago
<% if authenticated? %> + <% 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: { diff --git a/app/views/scraps/index.html.erb b/app/views/scraps/index.html.erb index 8b71688..cb3e84e 100644 --- a/app/views/scraps/index.html.erb +++ b/app/views/scraps/index.html.erb @@ -9,11 +9,10 @@ random thoughts longer than miniblog length will go here :)