Override Sessions Controller

12 views
Skip to first unread message

Matt Hall

unread,
Mar 26, 2015, 11:39:32 AM3/26/15
to plataforma...@googlegroups.com
I want to override the Sessions Controller. Here are the steps I've taken:
  • Create a sessions_controller.rb in the root of my controllers folder
  • Added the proper class name (class SessionsController < Devise::SessionsController) and added the new / create / destroy actions from the Devise base code
  • Added the route: devise_for :users, controllers: { sessions: "sessions" }
This seem correct, but whenever someone signs into my app, they don't hit my custom Sessions controller. Do I need to change the post URL in the "new" view? Here's what I have in that view: "form_for(resource, as: resource_name, url: session_path(resource_name))"

I have a debugger set in the create action and a before_filter set...and neither are being hit. What do I need to change the URL to?

Thanks!
Reply all
Reply to author
Forward
0 new messages