Sha256: 8194822563d6def57b9dfb9e293ce62419e2005b1faa58bc67af1608375ea181
Contents?: true
Size: 702 Bytes
Versions: 2
Compression:
Stored size: 702 Bytes
Contents
class Cbac::GenericRolesController < ApplicationController # The layout used for all CBAC pages layout "cbac" # GET /index # GET /index.xml def index end # POST /update def update @role = Cbac::GenericRole.find(params[:id]) @role.update_attributes(role_params) redirect_to :action => "index" end # POST /create def create @role = Cbac::GenericRole.new(role_params) @role.save redirect_to :action => "index" end # POST /delete def delete @role = Cbac::GenericRole.find(params[:id]) @role.delete redirect_to :action => "index" end private def role_params params.required(:cbac_generic_role).permit(:name, :remarks) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cbac-0.8.0 | lib/generators/cbac/copy_files/controllers/generic_roles_controller.rb |
cbac-0.7.0 | lib/generators/cbac/copy_files/controllers/generic_roles_controller.rb |