Sha256: ed3b90be1044c9667bdc3bccb78adefa0f43fdb3e423017b801c783c5dd1bdc4

Contents?: true

Size: 529 Bytes

Versions: 7

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

module Lcms
  module Engine
    module Admin
      class CurriculumsController < AdminController
        def edit
          @curriculum = CurriculumPresenter.new
        end

        def update
          @form = CurriculumForm.new(params[:curriculum])
          if @form.save
            redirect_to admin_path, notice: t('.success')
          else
            @curriculum = CurriculumPresenter.new
            render :edit, alert: t('.error')
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lcms-engine-0.3.1 app/controllers/lcms/engine/admin/curriculums_controller.rb
lcms-engine-0.1.4 app/controllers/lcms/engine/admin/curriculums_controller.rb
lcms-engine-0.3.0 app/controllers/lcms/engine/admin/curriculums_controller.rb
lcms-engine-0.1.3 app/controllers/lcms/engine/admin/curriculums_controller.rb
lcms-engine-0.2.0 app/controllers/lcms/engine/admin/curriculums_controller.rb
lcms-engine-0.1.2 app/controllers/lcms/engine/admin/curriculums_controller.rb
lcms-engine-0.1.0 app/controllers/lcms/engine/admin/curriculums_controller.rb