Class: Lcms::Engine::Admin::AssociationPickerController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- Lcms::Engine::ApplicationController
- AdminController
- Lcms::Engine::Admin::AssociationPickerController
- Defined in:
- app/controllers/lcms/engine/admin/association_picker_controller.rb
Constant Summary collapse
- VALID_ASSOCIATIONS =
%w( content_sources grades topics tags reading_assignment_authors reading_assignment_texts standards ).freeze
Constants inherited from AdminController
Lcms::Engine::Admin::AdminController::RE_GOOGLE_FOLDER
Instance Method Summary collapse
Methods inherited from AdminController
Methods included from PathHelper
#dynamic_document_path, #dynamic_material_path, #dynamic_path
Instance Method Details
#index ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/lcms/engine/admin/association_picker_controller.rb', line 13 def index @items = association_items @items = @items.where('name ilike ?', "%#{params[:q]}%") if index_params[:q].present? @items = @items.paginate(page: params[:page], per_page: 10).order('name asc') respond_to do |format| format.json { render json: pagination.serialize(@items, AssociationItemSerializer) } end end |