class method
self.new
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v3.2.22.5Signature
self.new(method)
No documentation comment.
Parameters
-
methodreq
Source
# File activerecord/lib/active_record/dynamic_scope_match.rb, line 8
def initialize(method)
@scope = true
case method.to_s
when /^scoped_by_([_a-zA-Z]\w*)$/
names = $1
else
@scope = nil
end
@attribute_names = names && names.split('_and_')
end
Defined in activerecord/lib/active_record/dynamic_scope_match.rb line 8
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::DynamicScopeMatch