Weird user/login engine behaviour

Hi all, have a weird issue going on. I have something like the
following to check out the current user information:
<%= “#{} / #{}” %>
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

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 =
%> 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

Hah, never mind…silly single =
Bad equals sign! bad!

goes and stands in the corner

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs