I followed the instructions given on devise page. Only thing different is that I am customizing registrations and their example is on sessions.
When I hit /users/sign_up page, devise is using Devise::RegistrationsController#new action instead of new action from users_controller.rb
As you can see from the server log below, XXXXXXXXXX\nxxxxxxxxxxx is not seen, even though user controller has new action that puts "XXXXXXXXXX\nxxxxxxxxxxx"
Started GET "/users/sign_up" for 127.0.0.1 at 2012-10-14 03:29:52 -0700
Processing by Devise::RegistrationsController#new as HTML
Rendered /Users/jasonkim/.rvm/gems/ruby-1.9.3-p0/gems/devise-2.1.2/app/views/devise/shared/_links.erb (0.4ms)
Rendered users/registrations/new.html.haml within layouts/application (4.8ms)
Completed 200 OK in 88ms (Views: 12.3ms | ActiveRecord: 0.7ms)
users_controller.rb
class Users::RegistrationsController < Devise::RegistrationsController
def new
@user = User.new
address = @user.address.build
puts "XXXXXXXXXX\nxxxxxxxxxxx"
end
end
routes.rb
devise_for :users, :controllers => { :registration => "users/registration" }
devise_for :employers
only thing i added in devise.rb
config.scoped_views = true
What am I missing?
It should be
with a trailing ‘s’ (but of course in lower case)