0
@@ -667,7 +667,7 @@ module ActiveRecord
0
# * <tt>:limit</tt> - An integer determining the limit on the number of rows that should be returned.
0
# * <tt>:offset</tt> - An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
0
# * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if you, for example, want to do a join
0
- # but not include the joined columns.
0
+ # but not include the joined columns.
Do not forget to include the primary and foreign keys, otherwise it will rise an error.0
# * <tt>:as</tt> - Specifies a polymorphic interface (See <tt>belongs_to</tt>).
0
# * <tt>:through</tt> - Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
0
# are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a <tt>belongs_to</tt>
0
@@ -747,6 +747,8 @@ module ActiveRecord
0
# as the default <tt>:foreign_key</tt>.
0
# * <tt>:include</tt> - Specify second-order associations that should be eager loaded when this object is loaded.
0
# * <tt>:as</tt> - Specifies a polymorphic interface (See <tt>belongs_to</tt>).
0
+ # * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
0
+ # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error.
0
# * <tt>:through</tt>: Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
0
# are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a
0
# <tt>has_one</tt> or <tt>belongs_to</tt> association on the join model.
0
@@ -821,8 +823,8 @@ module ActiveRecord
0
# if the real class name is Person, you'll have to specify it with this option.
0
# * <tt>:conditions</tt> - Specify the conditions that the associated object must meet in order to be included as a +WHERE+
0
# SQL fragment, such as <tt>authorized = 1</tt>.
0
- # * <tt>:order</tt> - Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
0
- # such as <tt>last_name, first_name DESC</tt>.
0
+ # * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
0
+ # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error.
0
# * <tt>:foreign_key</tt> - Specify the foreign key used for the association. By default this is guessed to be the name
0
# of the association with an "_id" suffix. So a class that defines a <tt>belongs_to :person</tt> association will use
0
# "person_id" as the default <tt>:foreign_key</tt>. Similarly, <tt>belongs_to :favorite_person, :class_name => "Person"</tt>
0
@@ -1011,7 +1013,7 @@ module ActiveRecord
0
# * <tt>:limit</tt> - An integer determining the limit on the number of rows that should be returned.
0
# * <tt>:offset</tt> - An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
0
# * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
0
- # but not include the joined columns.
0
+ # but not include the joined columns.
Do not forget to include the primary and foreign keys, otherwise it will raise an error.0
# * <tt>:readonly</tt> - If true, all the associated objects are readonly through the association.
0
@@ -1341,7 +1343,7 @@ module ActiveRecord
0
def create_has_one_reflection(association_id, options)
0
options.assert_valid_keys(
0
- :class_name, :foreign_key, :remote, :
conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :readonly
0
+ :class_name, :foreign_key, :remote, :
select, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :readonly
0
create_reflection(:has_one, association_id, options, self)
0
@@ -1349,14 +1351,14 @@ module ActiveRecord
0
def create_has_one_through_reflection(association_id, options)
0
options.assert_valid_keys(
0
- :class_name, :foreign_key, :remote, :
conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :through, :source, :source_type
0
+ :class_name, :foreign_key, :remote, :
select, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :through, :source, :source_type
0
create_reflection(:has_one, association_id, options, self)
0
def create_belongs_to_reflection(association_id, options)
0
options.assert_valid_keys(
0
- :class_name, :foreign_key, :foreign_type, :remote, :
conditions, :order, :include, :dependent,
0
+ :class_name, :foreign_key, :foreign_type, :remote, :
select, :conditions, :include, :dependent,
0
:counter_cache, :extend, :polymorphic, :readonly