Sha256: a9cf202f916bfb3ebd5c366aaabf92cbeb7e25ae2a5cc242c97b3bf6334aea23
Contents?: true
Size: 662 Bytes
Versions: 17
Compression:
Stored size: 662 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 end
Version data entries
17 entries across 17 versions & 1 rubygems