On Nov 18, 4:35 pm, nico Itkin <[EMAIL PROTECTED]>
wrote:
> => #<Guest id: 418519017, type: "Guest", ...#>
> g.update_attributes!(:type=>'Host')
> => true>> g
>
> => #<Guest id: 418519017, type: "Guest", ...#>
>
> #It seems that this "type" attribute is protected is there a way to
> by-pass this ?
Yup (and if you check your logs you'd probably see a warning about not
being able to mass assign a protected attribute)

There's two things you can play with: Directly setting the type
attribute or playing with the becomes method.

Fred

>
> you can find the pastie of the above code here :http://pastie.org/317885
> --
> 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 [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