We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

starrychloe • 12 years ago

#write_attribute doesn't seem to be available any more:

irb> u2.write_attribute(:username, u.username.clone)
NoMethodError: private method `write_attribute' called for #<user:0x5d84b88>

Heather • 12 years ago

I have a tendency to go along with every little thing that

was in fact written within “5 Ways to set Attributes in ActiveRecord

| David Verhasselt”. Thanks for all the actual info.

Thanks for the post-Modesto

Jeremy • 12 years ago

I liked your blog a only a blog from one direction, and I continue to read!

Nolan • 12 years ago

Dig it!

derek feng • 12 years ago

excellent post. very basic staff that needs to be understood.

tom • 13 years ago

this is great!

dennis • 13 years ago

Enjoyed the post! Thanks for the tips!

Eric • 13 years ago

Thanks for answering my question!!!

Martin Streicer • 13 years ago

Recent changes in Rails 3 altered the behavior of update_attribute to run validations. Use update_column to save to the database without validations.

David • 11 years ago

As far as I can tell, update_attribute does not run validations on ActiveRecord objects, but does on ActiveResource objects.