Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/association_scope.rb

Class Method Summary collapse

Class Method Details

.has_association_scope_on(models) ⇒ Object



19
20
21
22
# File 'lib/association_scope.rb', line 19

def self.has_association_scope_on(models)
  models = models.map(&:to_s)
  ::AssociationScope::Scope.inject_scopes(self, models)
end