Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6735523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:01:21+00:00 2026-05-26T11:01:21+00:00

How do I make devise execute functions after sign up, sign in etc. I

  • 0

How do I make devise execute functions after sign up, sign in etc. I tried putting functions like this in my application controller.

class ApplicationController < ActionController::Base
  private
  def after_sign_up_path_for(resource_or_scope)
    execute stuff
  end
end

With my routes like this

devise_for :users do
     get "/users/sign_out" => "devise/sessions#destroy", :as => :destroy_user_session
end

This doesn’t seem to do anything. I also tried making an sessions controller like so

class SessionsController < Devise::SessionsController
    functions
end

With my routes like this

devise_for :users, :controllers => {:sessions => 'devise/sessions'} do
    get "/users/sign_out" => "devise/sessions#destroy", :as => :destroy_user_session
end

This doesn’t seem to do anything as well, is there something I’m missing in making devise responsive. (I initially set up devise using this tutorial)
https://github.com/fortuity/rails3-subdomain-devise/wiki/Tutorial-(Walkthrough)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:01:21+00:00Added an answer on May 26, 2026 at 11:01 am

    You can create your own sessions_controller which inherits from Devise::SessionsController and override the actions you’d like to customize. For example, to perform some action after a user signs in, you could do:

    class SessionsController < Devise::SessionsController
      def create
        super
        perform_custom_stuff
      end
    end
    

    If calling super is insufficient, you could reproduce the current implementation of Devise::SessionsController#create in your controller. Then you have full control over what’s happening and can customize to tailor your exact needs. This may not be the prettiest solution, but might be necessary (at least to keep you going).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To make a JavaScript class with a public method I'd do something like: function
I'm trying to make a two-step confirmation like heroku using Devise. My routes: devise_for
Using devise, how do i make my Sign Up as my landing/welcome page and
If my authentification in rails made with devise drops off after i make destructive
I'm working on an app for a mobile device and would like to make
To make click-able divs, I do: <div class=clickable url=http://google.com> blah blah </div> and then
I make Android application which must receive data from the page http://example.com/get.php?id=1 . For
I'm using cucumber to test my rails 3.1 application and i'm using devise for
I'm using force_ssl (Rails 3.1, specifically in the Devise config) to make sure that
When I use the classic gnu Make I put in post build actions like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.