Hi all, have a weird issue going on. I have something like the
following to check out the current user information:
<%= "#{current_user.id} / #{post.user.id}" %>
This is in a partial that gets rendered as a collection. The odd thing
is that in every rendering the ids always show up the same, and to top
that off, the link_if_authorized is also using the poster id (or so it
seems) and renders the link if the original poster can do to the
action.Example. I'm logged in as a normal user. The first post was made by an admin and have 2 replies by the normal user. In the partial I have <%= link_if_authorized "Move", :controller => "post", :action => "move" %> where the action is limited to admins only. When the posts are rendered, the move link gets rendered on the first post only, and none of the others. I also have <% if session[:user] and session[:user].id = post.user.id %> which is followed by an edit link, which gets rendered for all the posts, even though I'm not logged in as the admin or creator of the first post. Any ideas?! I've looked for where else the session[:user] might get set, but can't find it anywhere. I haven't modified the 2 engines at all, so I'm not sure whats going on! Any help would be appreciated! -Nick "thoroughly confused' S _______________________________________________ engine-developers mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
