diff options
author | aditya-kapoor <aditya.kapoor@vinsol.com> | 2013-09-01 18:05:04 +0530 |
---|---|---|
committer | aditya-kapoor <aditya.kapoor@vinsol.com> | 2013-09-01 18:05:04 +0530 |
commit | 6b9b0767bf480d53029afeb3f8e86f66e933fb41 (patch) | |
tree | 62a76c76b8fce484d8a258aceb14ac475f2c94a8 /activemodel | |
parent | b27c40637aaf2549f91faec8e87f6d4afa9a7380 (diff) | |
parent | ab0cbff07ebb5df8c9354fa2b3fd9984e039d2c6 (diff) | |
download | rails-6b9b0767bf480d53029afeb3f8e86f66e933fb41.tar.gz rails-6b9b0767bf480d53029afeb3f8e86f66e933fb41.tar.bz2 rails-6b9b0767bf480d53029afeb3f8e86f66e933fb41.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel')
3 files changed, 4 insertions, 9 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index cc9483e67b..8b9ac97bbb 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -2,7 +2,9 @@ module ActiveModel module SecurePassword extend ActiveSupport::Concern - class << self; attr_accessor :min_cost; end + class << self + attr_accessor :min_cost # :nodoc: + end self.min_cost = false module ClassMethods diff --git a/activemodel/test/cases/serializers/json_serialization_test.rb b/activemodel/test/cases/serializers/json_serialization_test.rb index f0347081ee..e4f5e61e91 100644 --- a/activemodel/test/cases/serializers/json_serialization_test.rb +++ b/activemodel/test/cases/serializers/json_serialization_test.rb @@ -155,12 +155,6 @@ class JsonSerializationTest < ActiveModel::TestCase end end - test "as_json should keep the default order in the hash" do - json = @contact.as_json - - assert_equal %w(name age created_at awesome preferences), json.keys - end - test "from_json should work without a root (class attribute)" do json = @contact.to_json result = Contact.new.from_json(json) diff --git a/activemodel/test/cases/serializers/xml_serialization_test.rb b/activemodel/test/cases/serializers/xml_serialization_test.rb index c4cfb0c255..11ee17bb27 100644 --- a/activemodel/test/cases/serializers/xml_serialization_test.rb +++ b/activemodel/test/cases/serializers/xml_serialization_test.rb @@ -53,8 +53,7 @@ class XmlSerializationTest < ActiveModel::TestCase @contact.address.city = "Springfield" @contact.address.apt_number = 35 @contact.friends = [Contact.new, Contact.new] - @related_contact = SerializableContact.new - @contact.contact = @related_contact + @contact.contact = SerializableContact.new end test "should serialize default root" do |