Sha256: 7be112cf668a1bd3fc8023fbed2e09d59a7b2d16f26347cff3b23335811c9337
Contents?: true
Size: 773 Bytes
Versions: 26
Compression:
Stored size: 773 Bytes
Contents
class IshManager::LeadActionTemplatesController < IshManager::ApplicationController def create authorize! :create, Office::LeadActionTemplate @tmpl = ::Office::LeadActionTemplate.new params[:tmpl].permit! if @tmpl.save flash_notice 'saved' else flash_alert "cannot save: #{@tmpl.errors.full_messages.join(', ')}." end redirect_to action: :index end def edit @tmpl = Office::LeadActionTemplate.find params[:id] authorize! :edit, @tmpl end def index authorize! :index, Office::LeadActionTemplate @tmpls = ::Office::LeadActionTemplate.all @new_lat = ::Office::LeadActionTemplate.new end def new authorize! :new, Office::LeadActionTemplate @tmpl = ::Office::LeadActionTemplate.new end end
Version data entries
26 entries across 26 versions & 1 rubygems