On Apr 8, 2:32 pm, Andy Jeffries <[email protected]> wrote:
>
> I'm sure I've seen it in later versions, but thought I'd post it anyway.
>
> If it is deprecated, another way is:
>
> self.attributes['name'] = name + 'blah blah'
>
> It's not exactly the same as write_attribute (it doesn't typecast to numbers
> for numeric columns) but it will work the same in your case.
actually it is the same: active_record/base.rb says (in 2.3.5)
def []=(attr_name, value)
write_attribute(attr_name, value)
end
Couldn't see any trace in the source of write attribute being marked
as deprecated.
Fred
>
> Cheers,
>
> Andy
--
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.