From 62a9e5a96008ac0300c181ad7b182a4d5390920e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Thu, 29 Sep 2011 14:33:32 +0300 Subject: Class name specified in example is Person, not AttributePerson. --- activemodel/lib/active_model/attribute_methods.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activemodel/lib/active_model') diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index a201e983cd..ef0b95424e 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -93,10 +93,10 @@ module ActiveModel # # Provides you with: # - # AttributePerson.primary_key + # Person.primary_key # # => "sysid" - # AttributePerson.inheritance_column = 'address' - # AttributePerson.inheritance_column + # Person.inheritance_column = 'address' + # Person.inheritance_column # # => 'address_id' def define_attr_method(name, value=nil, &block) sing = singleton_class -- cgit v1.2.3 From eef176dc7d2d7cd5788d6b4ab37d39f0884ae334 Mon Sep 17 00:00:00 2001 From: Robert Ross Date: Tue, 4 Oct 2011 09:37:54 -0700 Subject: Fix as_json doc to say what it actually returns. --- activemodel/lib/active_model/serializers/json.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib/active_model') diff --git a/activemodel/lib/active_model/serializers/json.rb b/activemodel/lib/active_model/serializers/json.rb index 885964633f..31a3f1e148 100644 --- a/activemodel/lib/active_model/serializers/json.rb +++ b/activemodel/lib/active_model/serializers/json.rb @@ -15,7 +15,7 @@ module ActiveModel self.include_root_in_json = true end - # Returns a JSON string representing the model. Some configuration can be + # Returns a hash representing the model. Some configuration can be # passed through +options+. # # The option include_root_in_json controls the top-level behavior -- cgit v1.2.3 From ac49fb1aa92ac9f65e009eec2bb22f730f8c37f5 Mon Sep 17 00:00:00 2001 From: Robert Ross Date: Tue, 4 Oct 2011 23:42:37 -0700 Subject: Change one more place for JSON string to Hash --- activemodel/lib/active_model/serializers/json.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib/active_model') diff --git a/activemodel/lib/active_model/serializers/json.rb b/activemodel/lib/active_model/serializers/json.rb index 31a3f1e148..c845440120 100644 --- a/activemodel/lib/active_model/serializers/json.rb +++ b/activemodel/lib/active_model/serializers/json.rb @@ -42,7 +42,7 @@ module ActiveModel # The remainder of the examples in this section assume include_root_in_json is set to # false. # - # Without any +options+, the returned JSON string will include all the model's + # Without any +options+, the returned Hash will include all the model's # attributes. For example: # # user = User.find(1) -- cgit v1.2.3