lib/sudo_attributes.rb in sudo_attributes-0.4.0 vs lib/sudo_attributes.rb in sudo_attributes-0.5.0
- old
+ new
@@ -48,9 +48,14 @@
module InstanceMethods
def sudo_update_attributes(new_attributes)
self.send(:attributes=, new_attributes, false)
save
end
+
+ def sudo_update_attributes!(new_attributes)
+ self.send(:attributes=, new_attributes, false)
+ save!
+ end
end
end
ActiveRecord::Base.extend SudoAttributes::Base