From 16f96238ba59fd81017b1402eb665e55c5dd4ba5 Mon Sep 17 00:00:00 2001 From: Kuldeep Aggarwal Date: Sat, 1 Mar 2014 00:51:35 +0530 Subject: [ci skip] correct select examples and doc, ref [522c0fd] --- activerecord/lib/active_record/relation/query_methods.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 5d38f0dce8..d88858611c 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -202,7 +202,7 @@ module ActiveRecord # fields are retrieved: # # Model.select(:field) - # # => [#] + # # => [#] # # Although in the above example it looks as though this method returns an # array, it actually returns a relation object and can have other query @@ -211,12 +211,12 @@ module ActiveRecord # The argument to the method can also be an array of fields. # # Model.select(:field, :other_field, :and_one_more) - # # => [#] + # # => [#] # # You can also use one or more strings, which will be used unchanged as SELECT fields. # # Model.select('field AS field_one', 'other_field AS field_two') - # # => [#] + # # => [#] # # If an alias was specified, it will be accessible from the resulting objects: # @@ -224,7 +224,7 @@ module ActiveRecord # # => "value" # # Accessing attributes of an object that do not have fields retrieved by a select - # will throw ActiveModel::MissingAttributeError: + # except +id+ will throw ActiveModel::MissingAttributeError: # # Model.select(:field).first.other_field # # => ActiveModel::MissingAttributeError: missing attribute: other_field -- cgit v1.2.3