Something very strange happening with my devise setup.
I have a custom ConfirmationsController which I'm using for custom behaviour with devise.
My customer model:
class Customer
include Mongoid::Document
after_create :prepare_demo_app
devise :validatable,
:registerable,
:database_authenticatable,
:confirmable,
:trackable,
:rememberable,
:recoverable,
:mailchimp
## Confirmable
field :confirmation_token, :type => String
field :confirmed_at, :type => Time
field :confirmation_sent_at, :type => Time
My custom controller
class ConfirmationsController < Devise::ConfirmationsController
def create
puts "resource #{resource}"
puts "resource name #{resource_name}"
super
end
enter code here
My routes.rb
devise_for :customers,
:controllers => {:confirmations => "confirmations" },
:skip => [:sessions, :passwords], :format => false do
#... other gets and posts but nothing to do with confirmations
#...
end
When I hit this controller as per my routes file I enter an email. Click submit and get a null pointer for the resources. But not the resource name. Has anyone any ideas what I might be missing or why the customer would be coming through as null?