| Class | ActiveRecord::DynamicScopeMatch |
| In: |
vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb
|
| Parent: | Object |
| attribute_names | [R] | |
| scope | [R] |
# File vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb, line 3 3: def self.match(method) 4: ds_match = self.new(method) 5: ds_match.scope ? ds_match : nil 6: end
# File vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb, line 8
8: def initialize(method)
9: @scope = true
10: case method.to_s
11: when /^scoped_by_([_a-zA-Z]\w*)$/
12: names = $1
13: else
14: @scope = nil
15: end
16: @attribute_names = names && names.split('_and_')
17: end