aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorArthur Nogueira Neves <arthurnn@gmail.com>2014-06-13 12:21:46 -0500
committerArthur Nogueira Neves <arthurnn@gmail.com>2014-06-13 12:21:46 -0500
commit6071d626e50c1bfc45a5a15f403c56086e632ad4 (patch)
tree89c9e1df9066bb362d4211e90e93ef55070418bc /activemodel
parent1ecc0106aee551a99e04c03f9064cc07b652e057 (diff)
parent8a1468eef6a6567b7420ab83948f5f39118b2dcb (diff)
downloadrails-6071d626e50c1bfc45a5a15f403c56086e632ad4.tar.gz
rails-6071d626e50c1bfc45a5a15f403c56086e632ad4.tar.bz2
rails-6071d626e50c1bfc45a5a15f403c56086e632ad4.zip
Merge pull request #15690 from deeeki/activemodel_model_doc
[ci skip] Clarify ActiveModel::Model docs
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/model.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/model.rb b/activemodel/lib/active_model/model.rb
index 63716eebb1..640024eaa1 100644
--- a/activemodel/lib/active_model/model.rb
+++ b/activemodel/lib/active_model/model.rb
@@ -16,8 +16,8 @@ module ActiveModel
# end
#
# person = Person.new(name: 'bob', age: '18')
- # person.name # => 'bob'
- # person.age # => 18
+ # person.name # => "bob"
+ # person.age # => "18"
#
# Note that, by default, <tt>ActiveModel::Model</tt> implements <tt>persisted?</tt>
# to return +false+, which is the most common case. You may want to override
@@ -74,7 +74,7 @@ module ActiveModel
#
# person = Person.new(name: 'bob', age: '18')
# person.name # => "bob"
- # person.age # => 18
+ # person.age # => "18"
def initialize(params={})
params.each do |attr, value|
self.public_send("#{attr}=", value)