0
@@ -739,9 +739,6 @@ module ActiveRecord
0
# If true, all the associated objects are readonly through the association.
0
# If false, don't validate the associated objects when saving the parent object. true by default.
0
- # Mass assignment is allowed for this assocation (similar to <tt>ActiveRecord::Base#attr_accessible</tt>).
0
# has_many :comments, :order => "posted_on"
0
# has_many :comments, :include => :author
0
@@ -855,8 +852,6 @@ module ActiveRecord
0
# If true, the associated object is readonly through the association.
0
# If false, don't validate the associated object when saving the parent object. +false+ by default.
0
- # Mass assignment is allowed for this assocation (similar to <tt>ActiveRecord::Base#attr_accessible</tt>).
0
# has_one :credit_card, :dependent => :destroy # destroys the associated credit card
0
@@ -973,8 +968,6 @@ module ActiveRecord
0
# If true, the associated object is readonly through the association.
0
# If false, don't validate the associated objects when saving the parent object. +false+ by default.
0
- # Mass assignment is allowed for this assocation (similar to <tt>ActiveRecord::Base#attr_accessible</tt>).
0
# belongs_to :firm, :foreign_key => "client_of"
0
@@ -1190,8 +1183,6 @@ module ActiveRecord
0
# If true, all the associated objects are readonly through the association.
0
# If false, don't validate the associated objects when saving the parent object. +true+ by default.
0
- # Mass assignment is allowed for this assocation (similar to <tt>ActiveRecord::Base#attr_accessible</tt>).
0
# has_and_belongs_to_many :projects
0
@@ -1266,8 +1257,6 @@ module ActiveRecord
0
association = association_proxy_class.new(self, reflection)
0
- new_value = reflection.build_association(new_value) if reflection.options[:accessible] && new_value.is_a?(Hash)
0
if association_proxy_class == HasOneThroughAssociation
0
association.create_through_record(new_value)
0
self.send(reflection.name, new_value)
0
@@ -1519,12 +1508,11 @@ module ActiveRecord
0
:finder_sql, :counter_sql,
0
:before_add, :after_add, :before_remove, :after_remove,
0
- :validate
, :accessible0
def create_has_many_reflection(association_id, options, &extension)
0
options.assert_valid_keys(valid_keys_for_has_many_association)
0
options[:extend] = create_extension_modules(association_id, extension, options[:extend])
0
create_reflection(:has_many, association_id, options, self)
0
@@ -1534,12 +1522,11 @@ module ActiveRecord
0
@@valid_keys_for_has_one_association = [
0
:class_name, :foreign_key, :remote, :select, :conditions, :order,
0
:include, :dependent, :counter_cache, :extend, :as, :readonly,
0
- :validate, :primary_key
, :accessible0
+ :validate, :primary_key
0
def create_has_one_reflection(association_id, options)
0
options.assert_valid_keys(valid_keys_for_has_one_association)
0
create_reflection(:has_one, association_id, options, self)
0
@@ -1554,12 +1541,11 @@ module ActiveRecord
0
@@valid_keys_for_belongs_to_association = [
0
:class_name, :foreign_key, :foreign_type, :remote, :select, :conditions,
0
:include, :dependent, :counter_cache, :extend, :polymorphic, :readonly,
0
- :validate
, :accessible0
def create_belongs_to_reflection(association_id, options)
0
options.assert_valid_keys(valid_keys_for_belongs_to_association)
0
reflection = create_reflection(:belongs_to, association_id, options, self)
0
if options[:polymorphic]
0
@@ -1577,7 +1563,7 @@ module ActiveRecord
0
:finder_sql, :delete_sql, :insert_sql,
0
:before_add, :after_add, :before_remove, :after_remove,
0
- :validate
, :accessible0
options[:extend] = create_extension_modules(association_id, extension, options[:extend])
Why was this reverted? :(
This was discussed on the core list:
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/3c61e00916c365e5
It’s coming back, just post 2.2, it’s not yet ready for a stable release.