class Ransack::Search
def method_missing(method_id, *args)
def method_missing(method_id, *args) method_name = method_id.to_s getter_name = method_name.sub(/=$/, ''.freeze) if base.attribute_method?(getter_name) base.send(method_id, *args) elsif @context.ransackable_scope?(getter_name, @context.object) if method_name =~ /=$/ add_scope getter_name, args else @scope_args[method_name] end else super end end