docs/operation.md in clowne-1.2.0 vs docs/operation.md in clowne-1.3.0
- old
+ new
@@ -9,11 +9,11 @@
class UserCloner < Clowne::Cloner
nullify :email
after_persist do |_origin, cloned, **|
- cloned.update_attributes(email: "evl-#{cloned.id}.ms")
+ cloned.update(email: "evl-#{cloned.id}.ms")
end
end
user = User.create(email: "evl.ms")
# => <#User id: 1, email: 'evl.ms', ...>
@@ -32,10 +32,10 @@
# => <#User id: 2, email: 'evl-2.ms', ...>
# Call only after_persist callbacks:
user2 = operation.to_record
# => <#User id: 2, email: 'evl-2.ms', ...>
-user2.update_attributes(email: "admin@example.com")
+user2.update(email: "admin@example.com")
# => <#User id: 2, email: 'admin@example.com' ...>
operation.run_after_persist
# => <#User id: 2, email: 'evl-2.ms', ...>
```