diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4a0ccd7b..620c3cb7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,7 +9,7 @@ private def require_no_user if authenticated? flash[:warning] = "You must be logged out." - store and redirect_to edit_user_path + store and redirect_to edit_user_path(user) return false end end diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb index e4e6eba1..421c4465 100644 --- a/app/views/items/show.html.erb +++ b/app/views/items/show.html.erb @@ -4,7 +4,7 @@ <%= image_tag @item.item_category.icon, :class => 'icon', :size => '50x50' %>
-

<%= @item.name %> <% if @item.permission == "commons" || @item.user == @user %><%= link_to "[edit]", edit_user_item_path(@user, @item) %><% end %>

+

<%= @item.name %> <% if (@item.permission == "commons" && authenticated?) || @item.user == user %><%= link_to "[edit]", edit_user_item_path(@user, @item) %><% end %>

<%= @item.desc %>

diff --git a/app/views/maps/show.html.erb b/app/views/maps/show.html.erb index 36a78b48..4582fc31 100644 --- a/app/views/maps/show.html.erb +++ b/app/views/maps/show.html.erb @@ -4,13 +4,13 @@

# of Synapses: <%= @map.synapses.count %>

-

<%= @map.name %> <% if (@map.permission == "commons" && @user != nil) || @map.user == @user %><%= link_to "[edit]", edit_user_map_path(@user, @map) %><% end %>

+

<%= @map.name %> <% if (@map.permission == "commons" && authenticated?) || @map.user == user %><%= link_to "[edit]", edit_user_map_path(@user, @map) %><% end %>

<%= @map.desc %>

- +