Skip to content

Commit

Permalink
fix use_attr_accessible?
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Jun 8, 2013
1 parent e72b0a1 commit 4379712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/closure_tree/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def connection
def use_attr_accessible?
ActiveRecord::VERSION::MAJOR == 3 &&
defined?(ActiveModel::MassAssignmentSecurity) &&
model_class.accessible_attributes.empty?
model_class.respond_to?(:accessible_attributes) &&
model_class.accessible_attributes.present?
end

def include_forbidden_attributes_protection?
Expand Down

0 comments on commit 4379712

Please sign in to comment.