Sha256: f5750fb0c00790640786d2a3078ccbd889eac3aca549e52d872518237b229d45

Contents?: true

Size: 676 Bytes

Versions: 14

Compression:

Stored size: 676 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)
      end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
egov_utils-0.1.15 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.14 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.13 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.12 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.11 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.10 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.9 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.8 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.7 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.6 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.5 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.4 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.1 app/controllers/egov_utils/groups_controller.rb
egov_utils-0.1.0 app/controllers/egov_utils/groups_controller.rb