On Wed, Dec 3, 2008 at 10:02 AM, Patrick L.
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> Hi guys,
> I was just working on this application (http://pastie.org/329613) when I
> added this line "session[:user].include?(params[:id])" to an
unless
> statement and the app threw this error:
session is a Hash, and when you do session[:user], you''re getting back
the
value referenced by the key :user.
> NoMethodError in SignupsController#show
> undefined method `include?'' for 27:Fixnum
and it turns out that you stored 27 in there.
You may simply check the value against the params, if that''s what you
need
to do à la if session[:user] == params[:id]
Franz
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
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
-~----------~----~----~----~------~----~------~--~---