Class: ForumSubscription
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ForumSubscription
- Defined in:
- app/models/forum_subscription.rb
Instance Method Summary collapse
Instance Method Details
#toggle! ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/models/forum_subscription.rb', line 11 def toggle! case subscription_type when "optin" update(subscription_type: "optout") when "optout" update(subscription_type: "optin") end end |