diff --git a/lib/ransack/nodes/attribute.rb b/lib/ransack/nodes/attribute.rb index 73b57f2a..0607d86a 100644 --- a/lib/ransack/nodes/attribute.rb +++ b/lib/ransack/nodes/attribute.rb @@ -20,8 +20,7 @@ def name=(name) def valid? bound? && attr && - context.klassify(parent).ransackable_attributes(context.auth_object) - .include?(attr_name.split('.').last) + context.ransackable_attribute?(attr_name.split('.').last, context.klassify(parent)) end def associated_collection?