From ea2850b96a97d1c454d1f6ca0c8c7958cc63ea70 Mon Sep 17 00:00:00 2001 From: Viktor Fonic Date: Wed, 31 May 2017 10:21:51 +0800 Subject: 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. --- activemodel/lib/active_model/attribute_assignment.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel/lib/active_model/attribute_assignment.rb') 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." -- cgit v1.2.3