collectiveidea/awesome_nested_set — pull request #150 by rwilcox (2012-08-15 02:14:51+00:00)
Title: Data import mode

I'm not sure how well this fits with your philosophy of awesome_nested_set, and this pull request might solve too obscure of a problem, but hear me out.

I was using [seed_dump](https://rubygems.org/gems/seed_dump) today to translate my database into seeds.rb. Seed dump dumps everything: including attributes that awesome_nested_set really doesn't want you to set manually. (These attributes have their setters redeclared to emit an exception rather than actually set the value.

However, in my case (seed data) I really wanted to set the value to exactly what it was in the database.

So I created a setting that would turn off the warnings.

Perhaps I set myself up for failure / data integrity issues down the line - perhaps there are callbacks that make what I did super naive and dangerous. Certainly I'm pretty unsure about this patch myself... BUT someone using awesome nested set and trying to use seed.rb to populate values from it might have a bad time. So it might make sense after all. OR absolutely totally not - and that's super fine too.