Class: Lcms::Engine::Admin::StandardsController
Constant Summary
AdminController::RE_GOOGLE_FOLDER
Instance Method Summary
collapse
settings
Methods included from PathHelper
#dynamic_document_path, #dynamic_material_path, #dynamic_path
Instance Method Details
#edit ⇒ Object
10
|
# File 'app/controllers/lcms/engine/admin/standards_controller.rb', line 10
def edit; end
|
#index ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'app/controllers/lcms/engine/admin/standards_controller.rb', line 12
def index
@query = OpenStruct.new @query_params
scope = Standard.order(:id)
scope = scope.search_by_name(@query.name) if @query.name.present?
@standards = scope.paginate(page: params[:page])
end
|
#update ⇒ Object
21
22
23
24
25
26
27
|
# File 'app/controllers/lcms/engine/admin/standards_controller.rb', line 21
def update
if @standard.update(standard_params)
redirect_to lcms_engine.admin_standards_path, notice: t('.success')
else
render :edit
end
end
|