]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user_blocks/_block.html.erb
Use a current_user helper for accessing the logged in user in all views.
[rails.git] / app / views / user_blocks / _block.html.erb
index 362cfd107bcf9b5c371629515958e6c239e16902..501ae92d0ca1a80defd631320be9e59c868bd24a 100644 (file)
@@ -17,7 +17,7 @@
     <% end %>
   </td>
   <td class="<%= c1 %>"><%= link_to t('user_block.partial.show'), block %></td>
-  <td class="<%= c1 %>"><% if @user and @user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %></td>
+  <td class="<%= c1 %>"><% if current_user and current_user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %></td>
   <% if show_revoke_link %>
   <td class="<%= c1 %>"><% if block.active? %><%= link_to t('user_block.partial.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => block.id %><% end %></td>
   <% end %>