Sha256: 3e3dcce0d4debdd2058979c9b0ff2377be297f44bf8bd20560944a184b6d5ca9
Contents?: true
Size: 953 Bytes
Versions: 12
Compression:
Stored size: 953 Bytes
Contents
ActionController::Routing::Routes.draw do |map| root = Surveyor::Config['default.relative_url_root'] || "surveys/" map.with_options :controller => 'surveyor' do |s| s.available_surveys "#{root}", :conditions => {:method => :get}, :action => "new" # GET survey list s.take_survey "#{root}:survey_code", :conditions => {:method => :post}, :action => "create" # Only POST of survey to create s.view_my_survey "#{root}:survey_code/:response_set_code", :conditions => {:method => :get}, :action => "show" # GET viewable/printable? survey s.edit_my_survey "#{root}:survey_code/:response_set_code/take", :conditions => {:method => :get}, :action => "edit" # GET editable survey s.update_my_survey "#{root}:survey_code/:response_set_code", :conditions => {:method => :put}, :action => "update" # PUT edited survey end end
Version data entries
12 entries across 12 versions & 1 rubygems