Class: CommunicationPreferencesPolicy
- Inherits:
-
Struct
- Object
- Struct
- CommunicationPreferencesPolicy
- Defined in:
- app/policies/communication_preferences_policy.rb
Instance Attribute Summary collapse
-
#communication_preferences ⇒ Object
Returns the value of attribute communication_preferences.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#communication_preferences ⇒ Object
Returns the value of attribute communication_preferences
3 4 5 |
# File 'app/policies/communication_preferences_policy.rb', line 3 def communication_preferences @communication_preferences end |
#user ⇒ Object
Returns the value of attribute user
3 4 5 |
# File 'app/policies/communication_preferences_policy.rb', line 3 def user @user end |
Instance Method Details
#access? ⇒ Boolean
4 5 6 |
# File 'app/policies/communication_preferences_policy.rb', line 4 def access? Flipper.enabled?(:communication_preferences, user) end |