[Rails] Re: objects and attributes

2008-09-09 Thread Shandy Nantz
Fabio Eidi wrote: > try to do > > @user[attribute_name] = value > > if you pass a string or a symbol =] That did the trick. Thx, -S -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[Rails] Re: objects and attributes

2008-09-09 Thread Frederick Cheung
On 9 Sep 2008, at 18:25, Shandy Nantz wrote: > > @user."#{attribute_name}" > > However, that last bit of code doesn't work. Is there a way to do > what I > am trying to do, that is, use dot notion on an object to update a > field > whose value is being passed into the method? Thanks in advan

[Rails] Re: objects and attributes

2008-09-09 Thread Fabio Eidi
try to do @user[attribute_name] = value if you pass a string or a symbol =] -- Posted via http://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 gr