The Survey gem is not creating the routes on my Rails app so I am wondering what to put in the routes.rb file?
rails generate survey:install
rails generate survey routes namespace:survey
Its okay if it didn't add routes to your
routes.rb file. You can add it yourself. And since you have it namespaced within
Survey for your controllers you have to namespace in your routes file too.
namespace :survey do resources :surveys resources :attempts get 'survey_details' => 'surveys#get_details' #this request will be handled by get_details method of SurveysController end
Since it uses basic Create Read Update Delete in its controller,
resources :surveys will take care of these. For any additional routes you want to define for your controllers make sure to put them inside the