aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/README.rdoc14
-rw-r--r--activemodel/lib/active_model/serializers/json.rb6
2 files changed, 10 insertions, 10 deletions
diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc
index 89cacbcab4..73c58a87db 100644
--- a/activemodel/README.rdoc
+++ b/activemodel/README.rdoc
@@ -107,8 +107,8 @@ modules:
extend ActiveModel::Naming
end
- NamedPerson.model_name #=> "NamedPerson"
- NamedPerson.model_name.human #=> "Named person"
+ NamedPerson.model_name # => "NamedPerson"
+ NamedPerson.model_name.human # => "Named person"
{Learn more}[link:classes/ActiveModel/Naming.html]
@@ -139,7 +139,7 @@ modules:
end
Person.human_attribute_name('my_attribute')
- #=> "My attribute"
+ # => "My attribute"
{Learn more}[link:classes/ActiveModel/Translation.html]
@@ -157,7 +157,7 @@ modules:
person = Person.new
person.first_name = 'zoolander'
- person.valid? #=> false
+ person.valid? # => false
{Learn more}[link:classes/ActiveModel/Validations.html]
@@ -176,9 +176,9 @@ modules:
end
p = ValidatorPerson.new
- p.valid? #=> false
- p.errors.full_messages #=> ["Name must exist"]
+ p.valid? # => false
+ p.errors.full_messages # => ["Name must exist"]
p.name = "Bob"
- p.valid? #=> true
+ p.valid? # => true
{Learn more}[link:classes/ActiveModel/Validator.html]
diff --git a/activemodel/lib/active_model/serializers/json.rb b/activemodel/lib/active_model/serializers/json.rb
index e1dbc522de..cf1c4a0fed 100644
--- a/activemodel/lib/active_model/serializers/json.rb
+++ b/activemodel/lib/active_model/serializers/json.rb
@@ -18,9 +18,9 @@ module ActiveModel
# Returns a JSON string representing the model. Some configuration can be
# passed through +options+.
#
- # The option <tt>ActiveModel::Base.include_root_in_json</tt> controls the
- # top-level behavior of +to_json+. If true (the default) +to_json+ will
- # emit a single root node named after the object's type. For example:
+ # The option <tt>include_root_in_json</tt> controls the top-level behavior
+ # of +to_json+. If true (the default) +to_json+ will emit a single root
+ # node named after the object's type. For example:
#
# konata = User.find(1)
# konata.to_json