Sha256: 57a8e255212105c625218ed1ff94fd17c24765144d24da73fd6dc53ac11b2637

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

ActionController::Routing::Routes.draw do |map|
  map.with_options :controller => 'surveyor' do |s|
    s.available_surveys "surveys",                                        :conditions => {:method => :get}, :action => "new"                      # GET survey list
    s.take_survey       "surveys/:survey_code",                            :conditions => {:method => :post}, :action => "create"                  # Only POST of survey to create
    s.view_my_survey    "surveys/:survey_code/:response_set_code.:format", :conditions => {:method => :get}, :action => "show", :format => "html"  # GET viewable/printable? survey
    s.edit_my_survey    "surveys/:survey_code/:response_set_code/take",    :conditions => {:method => :get}, :action => "edit"                     # GET editable survey 
    s.update_my_survey  "surveys/:survey_code/:response_set_code",         :conditions => {:method => :put}, :action => "update"                   # PUT edited survey 
  end
  
  map.with_options :controller => 'results' do |r|
    r.show_surveys_result_lists "surveys/results", :conditions => {:method => :get}, :action => "index"
    r.show_one_survey_results "surveys/:id/result", :conditions => {:method => :get}, :action => "show"
  end   
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
surveyor-0.16.0 config/routes.rb
surveyor-0.15.0 config/routes.rb
surveyor-0.14.5 config/routes.rb
surveyor-0.14.4 config/routes.rb
surveyor-0.14.3 config/routes.rb
surveyor-0.14.2 config/routes.rb