Class: Effective::DatatablesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Effective::DatatablesController
- Defined in:
- app/controllers/effective/datatables_controller.rb
Instance Method Summary collapse
-
#show ⇒ Object
This will respond to both a GET and a POST.
Instance Method Details
#show ⇒ Object
This will respond to both a GET and a POST
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/effective/datatables_controller.rb', line 6 def show begin @datatable = find_datatable(params[:id]).try(:new) || raise('unable to find datatable') @datatable.view = view_context EffectiveDatatables.(self, :index, @datatable.collection_class) render json: @datatable.to_json rescue => e (EffectiveDatatables.(self, :index, @datatable.try(:collection_class)) rescue false) render json: error_json(e) raise e end end |