Skip to content

Tech Read..

Month: February 2014

Rails Devise Gem , customize the sign_in path


While using devise gem , once the user logs in successfully , by default it gets redirected to the home page set in routes.rb via “root” . To redirect it to different page , add following code in ApplicationController class


def after_sign_in_path_for(resource)
 "/welcome" #your custom page
end

Harshit rails Leave a comment February 18, 2014February 18, 2014 1 Minute

Categories

  • ant (1)
  • data structure (9)
  • github (1)
  • hibernate (2)
  • html (1)
  • java (60)
  • jgoodies (1)
  • json (1)
  • Latest News (15)
  • mongodb (2)
  • node.js (1)
  • python (3)
  • quiz (1)
  • rails (5)
  • rails 3.0 (2)
  • ruby (2)
  • spring (16)
  • swing (1)
  • twitter (1)
  • unix (2)
  • YQL (1)

Archives

  • November 2017 (2)
  • August 2017 (1)
  • December 2015 (1)
  • August 2015 (2)
  • November 2014 (1)
  • September 2014 (1)
  • May 2014 (6)
  • April 2014 (1)
  • March 2014 (3)
  • February 2014 (1)
  • January 2014 (1)
  • May 2013 (3)
  • April 2013 (1)
  • November 2011 (1)
  • October 2011 (3)
  • September 2011 (4)
  • July 2011 (1)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • October 2010 (1)
  • July 2010 (1)
  • June 2010 (2)
  • April 2010 (2)
  • February 2010 (2)
  • January 2010 (5)
  • September 2009 (1)
  • August 2009 (4)
  • July 2009 (2)
  • June 2009 (1)
  • May 2009 (5)
  • April 2009 (6)
  • March 2009 (12)
  • February 2009 (8)
  • January 2009 (7)
  • December 2008 (3)
  • November 2008 (6)
  • September 2008 (5)
  • June 2008 (1)
  • May 2008 (2)

Blog Stats

  • 362,730 hits
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Tech Read..
    • Join 29 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Tech Read..
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar