On Wed, Dec 3, 2008 at 10:02 AM, Patrick L.
<[EMAIL PROTECTED]> 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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to