I need to override the Devise session controller during the login process (Rails 3.0.9, Ruby 1.9.2, Devise 1.3.4), I tried this without any effect
class SessionsController < Devise::SessionsController
Ideas?
EDIT As indicated in the answer, I also need to change the route. In addition, I also need to copy the views. Here is better explained http://presentations.royvandewater.com/authentication-with-devise.html#8
My user strategy:
devise.rb config.warden do |manager| manager.strategies.add(:custom_strategy) do def authenticate! ... authenticate against 3rd party API... if res.body =~ /success/ u = User.find_or_initialize_by_email(params[:user][:email]) if u.new_record? u.save end success!(u) end end end
ruby-on-rails ruby-on-rails-3 devise
Johnny klassy
source share