diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-21 11:09:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-21 11:12:14 +0100 |
commit | 250c8092461f5e6bf62751b313f6605a37fd1b2b (patch) | |
tree | 7ef84aa83bd41eb023b9d4323d7208bd75d1b994 /activemodel/examples | |
parent | 9dd67fce25d3993a0ee494506ba246a45d395e3f (diff) | |
download | rails-250c8092461f5e6bf62751b313f6605a37fd1b2b.tar.gz rails-250c8092461f5e6bf62751b313f6605a37fd1b2b.tar.bz2 rails-250c8092461f5e6bf62751b313f6605a37fd1b2b.zip |
Require persisted? in ActiveModel::Lint and remove new_record? and destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
Diffstat (limited to 'activemodel/examples')
-rw-r--r-- | activemodel/examples/validations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/examples/validations.rb b/activemodel/examples/validations.rb index b039897ea5..0b2706076f 100644 --- a/activemodel/examples/validations.rb +++ b/activemodel/examples/validations.rb @@ -16,7 +16,7 @@ class Person @persisted = true end - def new_record? + def persisted? @persisted end end |