We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e72b0a1 commit 4379712Copy full SHA for 4379712
lib/closure_tree/support.rb
@@ -23,7 +23,8 @@ def connection
23
def use_attr_accessible?
24
ActiveRecord::VERSION::MAJOR == 3 &&
25
defined?(ActiveModel::MassAssignmentSecurity) &&
26
- model_class.accessible_attributes.empty?
+ model_class.respond_to?(:accessible_attributes) &&
27
+ model_class.accessible_attributes.present?
28
end
29
30
def include_forbidden_attributes_protection?
0 commit comments