We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbec0ef commit 2d2c0ddCopy full SHA for 2d2c0dd
lib/ransack/search.rb
@@ -103,14 +103,14 @@ def new_sort(opts = {})
103
def method_missing(method_id, *args)
104
method_name = method_id.to_s
105
getter_name = method_name.sub(/=$/, ''.freeze)
106
- if @context.ransackable_scope?(getter_name, @context.object)
+ if base.attribute_method?(getter_name)
107
+ base.send(method_id, *args)
108
+ elsif @context.ransackable_scope?(getter_name, @context.object)
109
if method_name =~ /=$/
110
add_scope getter_name, args
111
else
112
@scope_args[method_name]
113
end
- elsif base.attribute_method?(getter_name)
- base.send(method_id, *args)
114
115
super
116
0 commit comments