Skip to content

Instantly share code, notes, and snippets.

@cpatil
Created April 3, 2012 21:37
Show Gist options
  • Save cpatil/2295672 to your computer and use it in GitHub Desktop.
Save cpatil/2295672 to your computer and use it in GitHub Desktop.
undefined method `registration_path' - devise (2.0.4) with Rails (3.2.2)
# routes.rb
TestDevise::Application.routes.draw do
devise_for :users
root :to => 'welcome#index'
end
# rake routes
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
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
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
root / welcome#index
# error
undefined method `registration_path' for #<#<Class:0x007f936ab09c08>:0x007f936b049088>
Extracted source (around line #3):
1: <h2>Sign up</h2>
2:
3: <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4: <%= devise_error_messages! %>
5:
6: <div><%= f.label :email %><br />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment