From 5e705221004fe78f901cd7461fe59da5dc926706 Mon Sep 17 00:00:00 2001 From: Prasath Venkatraman Date: Mon, 6 Feb 2012 16:13:38 +0530 Subject: Changing active model dirty module helper method to more appropriate method with helper #4903 Changing active model dirty module helper method to more appropriate method with helper with Active Support Helper #4903 Changing active model dirty module helper method to more appropriate method with helper with Active Support Helper typo fixed #4903 --- activemodel/lib/active_model/dirty.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activemodel/lib') diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 026f077ee7..d327913824 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -1,6 +1,7 @@ require 'active_model/attribute_methods' require 'active_support/hash_with_indifferent_access' require 'active_support/core_ext/object/duplicable' +require 'active_support/core_ext/object/blank' module ActiveModel # == Active Model Dirty @@ -98,7 +99,7 @@ module ActiveModel # person.name = 'bob' # person.changed? # => true def changed? - changed_attributes.any? + changed_attributes.present? end # List of attributes with unsaved changes. -- cgit v1.2.3