On Sep 2, 12:58 pm, 7stud -- <li...@ruby-forum.com> wrote:
>
> >>> get_user_from_session.id.to_s # User with ID = 1
> >>> User.find('1-user-name') # User with ID = 1
>
> > so comparing params[:id] with the User ID converted to string will not
> > always be equal.
>
> I understand what you are saying, I just don't see how it's relevant to
> my problem.
>
I suspect that if you inspected the two things you are comparing you'd
see the relevance. I assume this is not using rails 3.1 ?
Fred
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment