Permalink
Browse files

attr_protected requires a database connection.

This might not be the best change, as the columns are now exposed; but, having attr_protected it here causes 'rake assets:precompile' to crash if the class is loaded on app boot.  Perhaps it's best to suggest the use of attr_accessible.
  • Loading branch information...
1 parent 7ecd93a commit cd78620df447f2bccc8f3c69de978cc7ea697cef @jswanner jswanner committed Oct 20, 2011
Showing with 0 additions and 11 deletions.
  1. +0 −5 lib/awesome_nested_set/awesome_nested_set.rb
  2. +0 −6 spec/awesome_nested_set_spec.rb
@@ -72,11 +72,6 @@ def acts_as_nested_set(options = {})
attr_accessor :skip_before_destroy
- # no bulk assignment
- if accessible_attributes.blank?
- attr_protected left_column_name.intern, right_column_name.intern
- end
-
before_create :set_default_left_and_right
before_save :store_new_parent
after_save :move_to_new_parent
@@ -74,12 +74,6 @@
}.should raise_exception(ActiveRecord::ActiveRecordError)
end
- it "colums_protected_on_initialize" do
- c = Category.new(:lft => 1, :rgt => 2)
- c.lft.should be_nil
- c.rgt.should be_nil
- end
-
it "scoped_appends_id" do
ScopedCategory.acts_as_nested_set_options[:scope].should == :organization_id
end

0 comments on commit cd78620

Please sign in to comment.