Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLaura Butler
3,251 PointsGenerating the User model- no user/sign_up page
Everything went fine and then when I went to load the user/sign_up page as listed in my command prompt it just redirects to the index/status page. Any ideas on what I should check?
1 Answer
David Ker
14,439 PointsCan you post what's in your routes.rb
file, and the output when you run rake routes
in your terminal?
Laura Butler
3,251 PointsLaura Butler
3,251 PointsHi,
Thanks for helping me out!
Rails.application.routes.draw do devise_for :users resources :statuses root to: 'statuses#index'
# The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root" # root 'welcome#index'
# Example of regular route: # get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id) # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically): # resources :products
# Example resource route with options: # resources :products do # member do # get 'short' # post 'toggle' # end # # collection do # get 'sold' # end # end
# Example resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end
# Example resource route with more complex sub-resources: # resources :products do # resources :comments # resources :sales do # get 'recent', on: :collection # end # end
# Example resource route with concerns: # concern :toggleable do # post 'toggle' # end # resources :posts, concerns: :toggleable # resources :photos, concerns: :toggleable
# Example resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end end
C:\Sites\c3app>rake routes Prefix Verb URI Pattern Controller#Action
new_user_session GET /users/sign_in(.:format) devise/sessions#n
ew user_session POST /users/sign_in(.:format) devise/sessions#c reate destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#d estroy user_password POST /users/password(.:format) devise/passwords# create new_user_password GET /users/password/new(.:format) devise/passwords# new edit_user_password GET /users/password/edit(.:format) devise/passwords# edit PATCH /users/password(.:format) devise/passwords# update PUT /users/password(.:format) devise/passwords# update cancel_user_registration GET /users/cancel(.:format) devise/registrati ons#cancel user_registration POST /users(.:format) devise/registrati ons#create new_user_registration GET /users/sign_up(.:format) devise/registrati ons#new edit_user_registration GET /users/edit(.:format) devise/registrati ons#edit PATCH /users(.:format) devise/registrati ons#update PUT /users(.:format) devise/registrati ons#update DELETE /users(.:format) devise/registrati ons#destroy statuses GET /statuses(.:format) statuses#index POST /statuses(.:format) statuses#create new_status GET /statuses/new(.:format) statuses#new edit_status GET /statuses/:id/edit(.:format) statuses#edit status GET /statuses/:id(.:format) statuses#show PATCH /statuses/:id(.:format) statuses#update PUT /statuses/:id(.:format) statuses#update DELETE /statuses/:id(.:format) statuses#destroy root GET / statuses#index
C:\Sites\c3app>
Laura Butler
3,251 PointsLaura Butler
3,251 PointsStarted from step one and is working now :)