diff --git a/app/views/walls/index.html.erb b/app/views/walls/index.html.erb index c1d4f56..84b84d7 100644 --- a/app/views/walls/index.html.erb +++ b/app/views/walls/index.html.erb @@ -19,7 +19,7 @@ <%= image_tag post.avatar %> <%= link_to post.username, user_path(post.user),class: 'username' %> <%= time_ago_in_words(post.created_at).capitalize %> Ago - <% if @post.user_id = current_user.id %> + <% if current_user and current_user.id == @post.user_id %>
<%= link_to 'Delete', post, method: :delete, data: { confirm: 'Are you sure?' } %> <%= link_to 'Edit', edit_post_path(post)%> diff --git a/config/secrets.yml b/config/secrets.yml index 468a752..179017c 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -20,3 +20,4 @@ test: # instead read values from the environment. production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> +