On Apr 8, 9:54 am, Marco Antonio Filho <[email protected]> wrote:

> class Unit < ActiveRecord::Base
>
>   def name= name
>     @name = name + 'bla bla'
>   end
>
> end
>
> In Ruby I could do this, but this doesn't affect my object at all...

The key thing is that ActiveRecord attributes aren't instance
variables. You can use write_attribute to write to the store of
attributes.

Fred
>
> How can I do that?
>
> Thanks in advance
> --
> Marco Antonio

-- 
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