Class: ExvoNotifications::NotificationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/exvo_notifications/notifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
# File 'app/controllers/exvo_notifications/notifications_controller.rb', line 6

def create
  user = User.find_or_create_by_uid(params[:user_uid])
  user.update_attributes(:plan => params[:edition_title])
  render :json => { :status => 200 }
end

#destroyObject



12
13
14
15
16
# File 'app/controllers/exvo_notifications/notifications_controller.rb', line 12

def destroy
  user = User.find_or_create_by_uid(params[:user_uid])
  user.update_attributes(:plan => nil)
  render :json => { :status => 200 }    
end