<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -68,8 +68,9 @@ module CollectiveIdea #:nodoc:
             attr_accessor :skip_before_destroy
           
             # no bulk assignment
-            attr_protected  left_column_name.intern,
-                            right_column_name.intern
+            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</diff>
      <filename>lib/awesome_nested_set.rb</filename>
    </modified>
    <modified>
      <diff>@@ -745,4 +745,14 @@ class AwesomeNestedSetTest &lt; TestCaseClass
 
       check_structure(Category.root.self_and_descendants, levels)
   end
+  
+  def test_model_with_attr_accessible
+    model = Class.new(ActiveRecord::Base)
+    model.set_table_name 'categories'
+    model.attr_accessible :name
+    assert_nothing_raised do
+      model.acts_as_nested_set
+      model.new(:name =&gt; 'foo')
+    end
+  end
 end</diff>
      <filename>test/awesome_nested_set_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b76af2bfbb39683b4ca28ab570a3136c897e9ab1</id>
    </parent>
  </parents>
  <author>
    <name>Brandon Keepers</name>
    <email>brandon@collectiveidea.com</email>
  </author>
  <url>http://github.com/collectiveidea/awesome_nested_set/commit/a74d6b13e7ff3d05c9a80b99ae8256df2a3a5bb3</url>
  <id>a74d6b13e7ff3d05c9a80b99ae8256df2a3a5bb3</id>
  <committed-date>2009-09-24T15:16:35-07:00</committed-date>
  <authored-date>2009-09-24T15:16:35-07:00</authored-date>
  <message>Avoid declaring attr_protected if attr_accessible has already been declared. closes #17</message>
  <tree>1f700328b6e2f7ba60fb1ac5d675a5ee441e51d6</tree>
  <committer>
    <name>Brandon Keepers</name>
    <email>brandon@collectiveidea.com</email>
  </committer>
</commit>
