class method
self.new
Ruby on Rails 8.0.4
Since v4.0.13 Last seen in v8.0.4Signature
self.new(model, method_name)
No documentation comment.
Parameters
-
modelreq -
method_namereq
Source
# File activerecord/lib/active_record/dynamic_matchers.rb, line 52
def initialize(model, method_name)
@model = model
@name = method_name.to_s
@attribute_names = @name.match(self.class.pattern)[1].split("_and_")
@attribute_names.map! { |name| @model.attribute_aliases[name] || name }
end
Defined in activerecord/lib/active_record/dynamic_matchers.rb line 52
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::DynamicMatchers::Method