Namespace
- CLASS Rhino::BasePolicy::Scope
Methods
- A
- C
- D
- I
- N
- P
- S
- U
Included Modules
- ActiveSupport::Callbacks
Attributes
[R] | auth_owner | |
[R] | record |
Class Public methods
new(auth_owner, record)
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 14 def initialize(auth_owner, record) 15 @auth_owner = auth_owner 16 @record = record 17 end
Instance Public methods
authorize_action(permission)
Link
Authorize the action with a default permission Ensure the callbacks are run
Source: show
create?()
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 35 def create? 36 authorize_action(false) 37 end
destroy?()
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 43 def destroy? 44 authorize_action(false) 45 end
index?()
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 27 def index? 28 authorize_action(false) 29 end
permitted_attributes_for_create()
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 47 def permitted_attributes_for_create 48 record.create_params 49 end
permitted_attributes_for_show()
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 51 def permitted_attributes_for_show 52 record.show_params 53 end
permitted_attributes_for_update()
Link
Source: show
# File rhino/rhino/app/policies/rhino/base_policy.rb 55 def permitted_attributes_for_update 56 record.update_params 57 end