Class: DiscourseSubscriptionClient::SubscriptionsController
- Inherits:
-
AdminController
- Object
- ApplicationController
- AdminController
- DiscourseSubscriptionClient::SubscriptionsController
- Defined in:
- app/controllers/discourse_subscription_client/subscriptions_controller.rb
Instance Method Summary collapse
Methods inherited from AdminController
#ensure_can_manage_subscriptions, #failed_json, #render_json_dump, #render_serialized, #serialize_data, #success_json
Instance Method Details
#index ⇒ Object
5 6 7 |
# File 'app/controllers/discourse_subscription_client/subscriptions_controller.rb', line 5 def index render_serialized(SubscriptionClientSubscription.all, SubscriptionSerializer, root: "subscriptions") end |
#update ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/discourse_subscription_client/subscriptions_controller.rb', line 9 def update if DiscourseSubscriptionClient::Subscriptions.update render_serialized(SubscriptionClientSubscription.all, SubscriptionSerializer, root: "subscriptions") else render json: failed_json end end |