Class: Motor::RemindersController
- Inherits:
-
ApiBaseController
- Object
- ActionController::API
- ApiBaseController
- Motor::RemindersController
- Defined in:
- app/controllers/motor/reminders_controller.rb
Instance Method Summary collapse
Methods included from CurrentAbility
Methods included from CurrentUserMethod
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/motor/reminders_controller.rb', line 9 def create @reminder.update!(author: current_user, recipient: current_user) broadcast_note_update(@reminder.record) render json: { data: Motor::ApiQuery::BuildJson.call(@reminder, params, current_ability) } end |
#destroy ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/motor/reminders_controller.rb', line 17 def destroy @reminder.destroy! broadcast_note_update(@reminder.record) head :ok end |