Module: CanTango::Api::Ability::Dsl

Includes:
Relationship
Defined in:
lib/cantango/api/ability/dsl.rb,
lib/cantango/api/ability/dsl/relationship.rb

Defined Under Namespace

Modules: Relationship

Instance Method Summary collapse

Methods included from Relationship

included

Instance Method Details

#scope(name) {|Scope.new name, self, &block| ... } ⇒ Object

creates a scope that enforces either using the user or user_account for determining relationship matches on the models

Yields:

  • (Scope.new name, self, &block)


9
10
11
# File 'lib/cantango/api/ability/dsl.rb', line 9

def scope name, &block
  yield Scope.new name, self, &block
end