Module: MarbleGate
- Defined in:
- lib/marble_gate.rb,
lib/marble_gate/access.rb,
lib/marble_gate/errors.rb,
lib/marble_gate/version.rb,
lib/marble_gate/authorizer.rb,
lib/marble_gate/base_methods.rb,
lib/marble_gate/controller_class_methods.rb
Defined Under Namespace
Modules: BaseMethods, ControllerClassMethods
Classes: Access, AccessDenied, Authorizer, MissingAuthorizer, MissingModel
Constant Summary
collapse
- VERSION =
"0.0.1"
- @@alias_map =
{
index: 'read',
show: 'read',
action_new: 'create',
edit: 'update'
}
- @@current_user_method_name =
:current_user
Class Method Summary
collapse
Class Method Details
.access(context, action, *args) ⇒ Object
6
7
8
|
# File 'lib/marble_gate/access.rb', line 6
def self.access(context, action, *args)
Access.new(context, (action == 'new') ? 'action_new' : action, *args)
end
|
.setup {|_self| ... } ⇒ Object
21
22
23
|
# File 'lib/marble_gate.rb', line 21
def self.setup
yield self
end
|