Module: Godmin::Resources::ResourceService::Scopes::ClassMethods

Defined in:
lib/godmin/resources/resource_service/scopes.rb

Instance Method Summary collapse

Instance Method Details

#scope(attr, options = {}) ⇒ Object



52
53
54
55
56
# File 'lib/godmin/resources/resource_service/scopes.rb', line 52

def scope(attr, options = {})
  scope_map[attr] = {
    default: false
  }.merge(options)
end

#scope_mapObject



48
49
50
# File 'lib/godmin/resources/resource_service/scopes.rb', line 48

def scope_map
  @scope_map ||= {}
end