Please sign in to comment.
Disable mass assignment protection by default
The problem with this was that the activemodel module used under the hood, breaks if it gets included into any other module (!). This is because it relies on the Class#class_attribute method added by active_support/core_ext/class/attribute.rb I do find it kinda strange that activemodel provides a module that definitely breaks when being included into another module, but well. A long term solution might be to come up with a patch for activemodel or to provide our own implementation. For now, I see no other way around that problem, apart from advising people to only include the module into the classes they actually want to use it in (mentioned in the README). This commit also moved our mass assignment support module around. old: Rails::DataMapper::MassAssignmentSecurity new: DataMapper::MassAssignmentSecurity The idea behind that was move was that there's no reason to touch the Rails namespace for something we might as well want to provide in none rails situations.
- Loading branch information...
Showing with 72 additions and 38 deletions.