Sha256: f7d368ed1300ea4e8518611a76fb07b4e04ac73f727666b440053489f2033a7c
Contents?: true
Size: 622 Bytes
Versions: 18
Compression:
Stored size: 622 Bytes
Contents
class MembershipKitsController < ApplicationController rescue_from CanCan::AccessDenied do |exception| flash[:alert] = exception.message redirect_to root_path, :alert => exception.message end before_filter do authorize! :edit, current_user.current_organization end def edit @kit = Kit.find(params[:id]) end def update @kit = Kit.find(params[:id]) if @kit.update_attributes(params[:membership_kit]) redirect_to organization_path(@kit.organization) else flash[:error] = "We had a problem configuring your kit. Please try again." render :edit end end end
Version data entries
18 entries across 18 versions & 1 rubygems