Sha256: 3099ee4100d8237c4d1ff87c1d0d422c48cd20adc6f7f8cab8f12f945f9054dd

Contents?: true

Size: 464 Bytes

Versions: 3

Compression:

Stored size: 464 Bytes

Contents

class Curupira::PermissionsController < Curupira::AuthorizedController
  def create
    @group_user = GroupUser.find(params[:group_user_id])

    if @group_user.update(permissions_params)
      redirect_to users_path, notice: "Permissões atualizadas com sucesso"
    else
      render :show
    end
  end

  private

  def permissions_params
    params.require(:group_user).permit(
      role_group_users_attributes:[:id, :role_id, :group_user_id]
    )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
curupira-0.1.7 app/controllers/curupira/permissions_controller.rb
curupira-0.1.6 app/controllers/curupira/permissions_controller.rb
curupira-0.1.4 app/controllers/curupira/permissions_controller.rb