Class: DevicesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/devices_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#fresh_when, #redirect_back_or_default, #redirect_referrer_or_default, #render_403, #render_404, #render_optional_error_file, #require_user, #set_active_menu, #set_locale, #set_seo_meta, #store_location, #unread_notify_count

Instance Method Details

#destroyObject


4
5
6
7
8
# File 'app/controllers/devices_controller.rb', line 4

def destroy
  @device = current_user.devices.find(params[:id])
  @device.delete
  redirect_to oauth_applications_path, notice: "设备信息已删除"
end