Sha256: 89fd3b88bcff66deb7366f28c5fff777b7ba31421af0d87c4aeda6993fb1b785
Contents?: true
Size: 752 Bytes
Versions: 13
Compression:
Stored size: 752 Bytes
Contents
class AbilitiesController < ApplicationController before_filter :check_permissions def index @abilities = Ability.order(:name) end def show @ability = Ability.find(params[:id]) end def new @ability = Ability.new end def create @ability = Ability.new(params[:ability]) if @ability.save flash[:notice] = t('ability.created') redirect_to :action => :index else render 'new' end end def edit @ability = Ability.find(params[:id]) end def update @ability = Ability.find(params[:id]) if @ability.update_attributes(params[:ability]) flash[:notice] = t('ability.saved') redirect_to :action => :index else render 'edit' end end private end
Version data entries
13 entries across 13 versions & 1 rubygems