Module: PolicyDefaults
- Included in:
- Policy::Base
- Defined in:
- lib/pundit_roles/policy/policy_defaults.rb
Overview
Defaults for Policy::Base
Constant Summary collapse
- DEFAULT_ASSOCIATED_ROLES =
defaults to this when no associated_as roles have been provided. It is also merged to the provided roles
[]
- RESTRICTED_SHOW_ATTRIBUTES =
restricted attributes for show
[]
- RESTRICTED_SAVE_ATTRIBUTES =
restricted attributes for save
[:id, :created_at, :updated_at]
- RESTRICTED_CREATE_ATTRIBUTES =
restricted attributes for create
[:id, :created_at, :updated_at]
- RESTRICTED_UPDATE_ATTRIBUTES =
restricted attributes for update
[:id, :created_at, :updated_at]
- RESTRICTED_SHOW_ASSOCIATIONS =
restricted associations for show
[]
- RESTRICTED_SAVE_ASSOCIATIONS =
restricted associations for save
[]
- RESTRICTED_CREATE_ASSOCIATIONS =
restricted associations for create
[]
- RESTRICTED_UPDATE_ASSOCIATIONS =
restricted associations for update
[]
Instance Method Summary collapse
-
#create? ⇒ Boolean
default create? method.
-
#destroy? ⇒ Boolean
default destroy? method.
-
#index? ⇒ Boolean
default index? method.
-
#show? ⇒ Boolean
default show? method.
-
#update? ⇒ Boolean
default update? method.
Instance Method Details
#create? ⇒ Boolean
default create? method
14 15 16 |
# File 'lib/pundit_roles/policy/policy_defaults.rb', line 14 def create? false end |
#destroy? ⇒ Boolean
default destroy? method
24 25 26 |
# File 'lib/pundit_roles/policy/policy_defaults.rb', line 24 def destroy? false end |
#index? ⇒ Boolean
default index? method
4 5 6 |
# File 'lib/pundit_roles/policy/policy_defaults.rb', line 4 def index? false end |
#show? ⇒ Boolean
default show? method
9 10 11 |
# File 'lib/pundit_roles/policy/policy_defaults.rb', line 9 def show? false end |
#update? ⇒ Boolean
default update? method
19 20 21 |
# File 'lib/pundit_roles/policy/policy_defaults.rb', line 19 def update? false end |