Sha256: 5b34a610e34a7311079d0684206c15f22b2ebbee3179cb49849d47b82c344b1d

Contents?: true

Size: 691 Bytes

Versions: 14

Compression:

Stored size: 691 Bytes

Contents

require_dependency "egov_utils/application_controller"

module EgovUtils
  class GroupsController < ApplicationController

    load_and_authorize_resource

    def create
      respond_to do |format|
        if @group.save
          format.html{ redirect_to main_app.root_path, notice: t('success_created') }
          format.json{ render json: @group, status: :created }
        else
          format.html{ render 'new' }
          format.json{ render json: @group.errors.full_messages, status: :unprocessable_entity }
        end
      end
    end

    private

      def create_params
        params.require(:group).permit(:name, :provider, :ldap_uid, :external_uid)
      end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
egov_utils-0.1.35 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.33 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.32 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.31 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.30 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.29 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.28 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.27 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.26 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.23 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.19 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.18 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.17 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.16 app/controllers/egov_utils/groups_controller.rb