Skip to content

Commit

Permalink
New Survey
Browse files Browse the repository at this point in the history
  • Loading branch information
diasks2 committed Apr 25, 2012
1 parent 47437f6 commit e524f79
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ Then, in the command line:
$ heroku run rake surveyor FILE=surveys/kitchen_sink_survey.rb
$ heroku open

Now navigate to http://[yourappname].herokuapp.com/surveys
Now navigate to http://[yourappname].herokuapp.com/surveys

13) Try making your own survey

Create a new file in the surveys folder of your project, name it 'my_survey.rb' and edit it as you like.

14) Parse the survey

$ bundle exec rake surveyor FILE=surveys/my_survey.rb


26 changes: 26 additions & 0 deletions surveys/my_survey.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
survey "My Survey" do

section "Section 1" do
label "This is Section 1 of 'My Survey'"

q_1 "What is your favorite color?", :pick => :one
a_1 "red"
a_2 "blue"
a_3 "green"
a_4 "yellow"
a_5 :other

end

section "Section 2" do
label "This is Section 2 of 'My Survey'"

q_2 "What colors do you like?", :pick => :any
a_1 "red"
a_2 "blue"
a_3 "green"
a_4 "yellow"

end
end

0 comments on commit e524f79

Please sign in to comment.