Hi all,
Along the similar lines of this issue. I'm trying to understand how
to override the devise SessionsController and what I've done is that
I've copied the code in the current devise repository devise / app /
controllers / devise/sessions_controller.rb into my own
sessions_controller.rb
this is what the code looks like
class SessionsController < Devise::SessionsController
prepend_before_filter :require_no_authentication, :only =>
[ :new, :create ]
include Devise::Controllers::InternalHelpers
# POST /resource/sign_in
def create
resource = warden.authenticate!(:scope => resource_name, :recall
=> "#{controller_path}#new")
set_flash_message(:notice, :signed_in) if is_navigational_format?
sign_in(resource_name, resource)
respond_with resource, :location =>
redirect_location(resource_name, resource)
end
end
I've also got the routes setup as indicated in the README file on
github.
However, I'm getting a method not found error is_navigational_format?
undefined method `is_navigational_format?' for #<SessionsController:
0x00000100ec7588>
I know this might be a simple fix, but I'm not sure how to refer to
this helper method in devise in my own controller.
thanks,
Grace
On Dec 2 2010, 4:34 pm, Christian Fazzini