Class PathsController
In: app/controllers/paths_controller.rb
Parent: ApplicationController

Methods

create   destroy   find   show  

Public Instance methods

[Source]

    # File app/controllers/paths_controller.rb, line 28
28:   def create
29:     path = Path.new(:user => current_user, :title => params[:path][:title])
30:     
31:     if !current_user.anonymous? and path.save
32:       render :xml => path, :status => :created,
33:           :location => path
34:     else
35:       render :xml => path.errors, :status => :unprocessable_entity
36:     end
37:   end

[Source]

    # File app/controllers/paths_controller.rb, line 39
39:   def destroy
40:     @path.destroy
41: 
42:     head :ok
43:   end

Filter-functions

[Source]

    # File app/controllers/paths_controller.rb, line 47
47:   def find
48:     @path = Path.find_by_id(params[:id])
49:   end

REST-methods

[Source]

    # File app/controllers/paths_controller.rb, line 22
22:   def show
23:     respond_to do |format|
24:       format.xml { render :xml => @path }
25:     end
26:   end

[Validate]