Class PermaLinksController
In: app/controllers/perma_links_controller.rb
Parent: ApplicationController

Methods

create  

Public Instance methods

REST-methods

[Source]

    # File app/controllers/perma_links_controller.rb, line 23
23:   def create
24:     self.insert_links(@logi, @logi_version, params[:body_with_inserts],
25:         :require_to_logi => true)
26: 
27:     if @logi.errors.empty? and self.thorny_form_free_of_spam?
28:       flash[:notice] = t 'c.perma_links.added'
29:       if !params[:and_attach] or params[:and_attach].empty?
30:         redirect_to logi_url(@logi)
31:       else
32:         @selected = 'link'
33:         @link_selected = 'perma_link'
34:         render :template => 'logi_inserts/new'
35:       end
36:     else
37:       flash[:error] = t 'c.perma_links.error_adding'
38:       @selected = 'link'
39:       @link_selected = 'perma_link'
40:       @perma_link = params[:perma_link]
41:       @check_link = Link.new_from_s(@perma_link.dup)
42:       @check_link.resolve
43:       render :template => 'logi_inserts/new'
44:     end
45:   end

[Validate]