debugged users/new issue. I was logged in and trying to navigate to that page, and it was trying to redirect to a page that doesn't exist anymore.

This commit is contained in:
Connor Turland 2012-10-29 14:21:36 -04:00
parent d2fbd05c3e
commit baf440afda
3 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@ private
def require_no_user def require_no_user
if authenticated? if authenticated?
flash[:warning] = "You must be logged out." flash[:warning] = "You must be logged out."
store and redirect_to edit_user_path store and redirect_to edit_user_path(user)
return false return false
end end
end end

View file

@ -4,7 +4,7 @@
<%= image_tag @item.item_category.icon, :class => 'icon', :size => '50x50' %> <%= image_tag @item.item_category.icon, :class => 'icon', :size => '50x50' %>
</div> </div>
<div class="focusmiddle"> <div class="focusmiddle">
<h1 class="title"><%= @item.name %> <% if @item.permission == "commons" || @item.user == @user %><%= link_to "[edit]", edit_user_item_path(@user, @item) %><% end %></h1> <h1 class="title"><%= @item.name %> <% if (@item.permission == "commons" && authenticated?) || @item.user == user %><%= link_to "[edit]", edit_user_item_path(@user, @item) %><% end %></h1>
<div class="desc"> <div class="desc">
<p><%= @item.desc %></p> <p><%= @item.desc %></p>
</div> </div>

View file

@ -4,13 +4,13 @@
<p># of Synapses: <%= @map.synapses.count %></p> <p># of Synapses: <%= @map.synapses.count %></p>
</div> </div>
<div class="focusmiddle"> <div class="focusmiddle">
<h1 class="title"><%= @map.name %> <% if (@map.permission == "commons" && @user != nil) || @map.user == @user %><%= link_to "[edit]", edit_user_map_path(@user, @map) %><% end %></h1> <h1 class="title"><%= @map.name %> <% if (@map.permission == "commons" && authenticated?) || @map.user == user %><%= link_to "[edit]", edit_user_map_path(@user, @map) %><% end %></h1>
<div class="desc"> <div class="desc">
<p><%= @map.desc %></p> <p><%= @map.desc %></p>
</div> </div>
</div> </div>
<div class="focusright"> <div class="focusright">
<div class="link"><p>Permissions:<%= @map.permission %></p></div> <div class="link"><p>Permissions: <%= @map.permission %></p></div>
</div> </div>
</div> </div>
<div class="clearfloat nodemargin"></div> <div class="clearfloat nodemargin"></div>