Skip to content

Commit

Permalink
Add new if statement for .post-edit class
Browse files Browse the repository at this point in the history
  • Loading branch information
Muncken87 committed Aug 27, 2016
1 parent 421e78c commit c6e564d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/walls/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<%= image_tag post.avatar %>
<%= link_to post.username, user_path(post.user),class: 'username' %>
<small class="post-submitted"> <%= time_ago_in_words(post.created_at).capitalize %> Ago </small>
<% if @post.user_id = current_user.id %>
<% if current_user and current_user.id == @post.user_id %>
<div class="post-edit">
<%= link_to 'Delete', post, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= link_to 'Edit', edit_post_path(post)%>
Expand Down
1 change: 1 addition & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ test:
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

0 comments on commit c6e564d

Please sign in to comment.