Sha256: c37dc3fbca43513ff7001edf6b013d2eda377b9e64f5997b42a20a89ed8adcf0
Contents?: true
Size: 702 Bytes
Versions: 15
Compression:
Stored size: 702 Bytes
Contents
require_dependency "wobauth/application_controller" module Wobauth class RolesController < ApplicationController before_action :set_role, only: [:show, :edit, :update, :destroy] before_action :add_breadcrumb_show, only: [:show] # GET /roles def index @roles = Role.all respond_with(@roles) end # GET /roles/1 def show respond_with(@role) end private # Use callbacks to share common setup or constraints between actions. def set_role @role = Role.find(params[:id]) end # Only allow a trusted parameter "white list" through. def role_params params.require(:role).permit(:name) end end end
Version data entries
15 entries across 15 versions & 1 rubygems