diff options
author | Viktor Fonic <viktor.fonic@gmail.com> | 2017-05-31 10:21:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 10:21:51 +0800 |
commit | ea2850b96a97d1c454d1f6ca0c8c7958cc63ea70 (patch) | |
tree | fa984d86b121ce718a681a598d65078f6d10785c | |
parent | 763ef6d2fac116753797f7b763734f6243a7db55 (diff) | |
download | rails-ea2850b96a97d1c454d1f6ca0c8c7958cc63ea70.tar.gz rails-ea2850b96a97d1c454d1f6ca0c8c7958cc63ea70.tar.bz2 rails-ea2850b96a97d1c454d1f6ca0c8c7958cc63ea70.zip |
Docs: Fix output representation [ci skip]
The output of two string attributes is displayed differently in the docs. Standardize the output by always showing it as a comment.
-rw-r--r-- | activemodel/lib/active_model/attribute_assignment.rb | 4 |
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." |