aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/attribute_assignment.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-05-31 11:31:24 +0900
committerGitHub <noreply@github.com>2017-05-31 11:31:24 +0900
commit60dd214784a709ac6ece73ba35483f9c4700d0e7 (patch)
treefa984d86b121ce718a681a598d65078f6d10785c /activemodel/lib/active_model/attribute_assignment.rb
parent763ef6d2fac116753797f7b763734f6243a7db55 (diff)
parentea2850b96a97d1c454d1f6ca0c8c7958cc63ea70 (diff)
downloadrails-60dd214784a709ac6ece73ba35483f9c4700d0e7.tar.gz
rails-60dd214784a709ac6ece73ba35483f9c4700d0e7.tar.bz2
rails-60dd214784a709ac6ece73ba35483f9c4700d0e7.zip
Merge pull request #29292 from vfonic/patch-1
Docs: Fix output representation [ci skip]
Diffstat (limited to 'activemodel/lib/active_model/attribute_assignment.rb')
-rw-r--r--activemodel/lib/active_model/attribute_assignment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/attribute_assignment.rb b/activemodel/lib/active_model/attribute_assignment.rb
index ee130df989..930e89d611 100644
--- a/activemodel/lib/active_model/attribute_assignment.rb
+++ b/activemodel/lib/active_model/attribute_assignment.rb
@@ -19,10 +19,10 @@ module ActiveModel
# cat = Cat.new
# cat.assign_attributes(name: "Gorby", status: "yawning")
# cat.name # => 'Gorby'
- # cat.status => 'yawning'
+ # cat.status # => 'yawning'
# cat.assign_attributes(status: "sleeping")
# cat.name # => 'Gorby'
- # cat.status => 'sleeping'
+ # cat.status # => 'sleeping'
def assign_attributes(new_attributes)
if !new_attributes.respond_to?(:stringify_keys)
raise ArgumentError, "When assigning attributes, you must pass a hash as an argument."