aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authordeeeki <deeeki@gmail.com>2014-06-14 01:56:55 +0900
committerdeeeki <deeeki@gmail.com>2014-06-14 02:13:50 +0900
commit8a1468eef6a6567b7420ab83948f5f39118b2dcb (patch)
tree6f0dbcdafc31dc645c449a143c6acccdac9d2dac /activemodel
parente0063270c2ca576ee6ea77889dab7bfb7110b612 (diff)
downloadrails-8a1468eef6a6567b7420ab83948f5f39118b2dcb.tar.gz
rails-8a1468eef6a6567b7420ab83948f5f39118b2dcb.tar.bz2
rails-8a1468eef6a6567b7420ab83948f5f39118b2dcb.zip
[ci skip] Clarify ActiveModel::Model docs
ActiveModel attributes initialized with String return String values
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)