Class: CanCanCan::NestedAssignmentAndAuthorization::Configuration
- Inherits:
-
Object
- Object
- CanCanCan::NestedAssignmentAndAuthorization::Configuration
- Defined in:
- lib/cancancan/configuration.rb
Instance Attribute Summary collapse
-
#silence_raised_errors ⇒ Object
Returns the value of attribute silence_raised_errors.
-
#use_resource_key_in_params ⇒ Object
Returns the value of attribute use_resource_key_in_params.
-
#use_smart_nested_authorizations ⇒ Object
Returns the value of attribute use_smart_nested_authorizations.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cancancan/configuration.rb', line 6 def initialize # Allows for stopping unauthorized actions without raising errors @silence_raised_errors = false # Auto-determine what action to auth on nested associations (:create, :update, :destroy) # - will use the action of the root object otherwise. = true # Set to `true` if you're nesting parameter data under the resource_key # - i.e. params => {user: {email: 'test', name: 'fun'}} # Set to `false` if resource parameter data is direct in in params. # - i.e. params => {email: 'test', name: 'fun'} @use_resource_key_in_params = false end |
Instance Attribute Details
#silence_raised_errors ⇒ Object
Returns the value of attribute silence_raised_errors.
4 5 6 |
# File 'lib/cancancan/configuration.rb', line 4 def silence_raised_errors @silence_raised_errors end |
#use_resource_key_in_params ⇒ Object
Returns the value of attribute use_resource_key_in_params.
4 5 6 |
# File 'lib/cancancan/configuration.rb', line 4 def use_resource_key_in_params @use_resource_key_in_params end |
#use_smart_nested_authorizations ⇒ Object
Returns the value of attribute use_smart_nested_authorizations.
4 5 6 |
# File 'lib/cancancan/configuration.rb', line 4 def end |