From 9994f0d90248db7d7eae36f0b597a15e8a427612 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 10 Sep 2008 18:50:01 +0100 Subject: Revert "Add :accessible option to Associations for allowing mass assignments using hash. [#474 state:resolved]" This reverts commit e0750d6a5c7f621e4ca12205137c0b135cab444a. Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_collection.rb --- activerecord/test/models/author.rb | 2 +- activerecord/test/models/post.rb | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb index ad0123cf2c..37551c8157 100644 --- a/activerecord/test/models/author.rb +++ b/activerecord/test/models/author.rb @@ -1,5 +1,5 @@ class Author < ActiveRecord::Base - has_many :posts, :accessible => true + has_many :posts has_many :posts_with_comments, :include => :comments, :class_name => "Post" has_many :posts_with_comments_sorted_by_comment_id, :include => :comments, :class_name => "Post", :order => 'comments.id' has_many :posts_sorted_by_id_limited, :class_name => "Post", :order => 'posts.id', :limit => 1 diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index e23818eb33..3adbc0ce1f 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -33,12 +33,6 @@ class Post < ActiveRecord::Base has_and_belongs_to_many :categories has_and_belongs_to_many :special_categories, :join_table => "categories_posts", :association_foreign_key => 'category_id' - belongs_to :creatable_author, :class_name => 'Author', :accessible => true - has_one :uncreatable_comment, :class_name => 'Comment', :accessible => false, :order => 'id desc' - has_one :creatable_comment, :class_name => 'Comment', :accessible => true, :order => 'id desc' - has_many :creatable_comments, :class_name => 'Comment', :accessible => true, :dependent => :destroy - has_and_belongs_to_many :creatable_categories, :class_name => 'Category', :accessible => true - has_many :taggings, :as => :taggable has_many :tags, :through => :taggings do def add_joins_and_select -- cgit v1.2.3