Class: Notifiable::DeviceTokensController
- Inherits:
-
Object
- Object
- Notifiable::DeviceTokensController
- Defined in:
- app/controllers/notifiable/device_tokens_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/notifiable/device_tokens_controller.rb', line 12 def create @device_token = DeviceToken.find_or_initialize_by(:token => params[:token]) @device_token.is_valid = true perform_update(device_token_params) end |
#destroy ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/notifiable/device_tokens_controller.rb', line 22 def destroy if @device_token.destroy head :status => :ok else render :json => { :errors => @device_token.errors. }, :status => :unprocessable_entity end end |
#update ⇒ Object
18 19 20 |
# File 'app/controllers/notifiable/device_tokens_controller.rb', line 18 def update perform_update(device_token_params) end |