Class: Usman::RegistrationDevicesController
- Inherits:
-
ResourceController
- Object
- Kuppayam::BaseController
- ApplicationController
- ResourceController
- Usman::RegistrationDevicesController
- Defined in:
- app/controllers/usman/registration_devices_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/usman/registration_devices_controller.rb', line 7 def index get_collections respond_to do |format| format.html {} format.js { js_view_path = @resource_options && @resource_options[:js_view_path] ? "#{@resource_options[:js_view_path]}/index" : :index render js_view_path } end end |
#show ⇒ Object
18 19 20 21 22 |
# File 'app/controllers/usman/registration_devices_controller.rb', line 18 def show @device = @r_object = @resource_options[:class].find_by_id(params[:id]) set_notification(false, I18n.t('status.error'), I18n.t('status.not_found', item: default_item_name.titleize)) unless @r_object render_accordingly end |