From 250c8092461f5e6bf62751b313f6605a37fd1b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 21 Feb 2010 11:09:21 +0100 Subject: 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. --- activemodel/examples/validations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/examples') 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 -- cgit v1.2.3