# Given a User class class User < ActiveRecord::Base attr_accessible :name end
# Creating a new user > User.sudo_create(name: 'Pete', email: 'em...@example.com', account: Account.first)
# Updating an existing user > new_account = Account.last > User.find(1).sudo_update_attributes(account: new_account)
but can't remember the syntax for "without_protection"
User.create({name: 'Pete', email: 'em...@example.com', account: Account.first}, without_protection: true)
User.find(1).update_attributes({account: new_account}, without_protection: true)
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.