Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法完全禁用 Rails3 中的 MassAssignmentSecurity 功能?
我们正忙于升级,需要暂时禁用它:)
在config/application.rb您可以将 设置config.active_record.whitelist_attributes为false因此您遇到相反的情况时,您必须禁止访问不应访问的属性。在底线,会做你想做的,...
config/application.rb
config.active_record.whitelist_attributes
false