Class: Mdm::Enrollment::DevicesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Mdm::Enrollment::DevicesController
- Defined in:
- app/controllers/mdm/management/devices_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/mdm/management/devices_controller.rb', line 8 def index @devices = Device.all render json: { devices: @devices.map { |device| device.as_json(except: [ :unlock_token, :push_magic ]) } } end |
#show ⇒ Object
19 20 21 22 |
# File 'app/controllers/mdm/management/devices_controller.rb', line 19 def show @device = Device.find(params[:id]) render json: { device: @device } end |