Class StepsController
In: app/controllers/steps_controller.rb
Parent: ApplicationController

Methods

create  

Public Instance methods

REST-methods

[Source]

    # File app/controllers/steps_controller.rb, line 17
17:   def create
18:     s_params = params[:step].dup
19:     if s_params[:logi_link]
20:       l = Link.new_from_s(s_params.delete(:logi_link))
21:       l.resolve
22:       s_params[:logi] = l.to_logi
23:     end
24:     s_params[:path] = Path.find_by_id(s_params[:path][:id])
25: 
26:     step = Step.new(s_params)
27:     
28:     if !current_user.anonymous? and step.save
29:       render :xml => step, :status => :created,
30:           :location => step
31:     else
32:       render :xml => step.errors, :status => :unprocessable_entity
33:     end
34:   end

[Validate]