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

  • Home
  • SEARCH
  • 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 8779859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:54:09+00:00 2026-06-13T19:54:09+00:00

What are some simple ways to hook into Devise so that I can distinguish

  • 0

What are some simple ways to hook into Devise so that I can distinguish between the following events: 1. sign up, 2. sign in

I just need to know how to hook in to Devise for this. I haven’t found what I’m looking for yet — a clean, minimal, controller-level implementation. Here are some options that I’ve tried:

  1. Create a custom controller (as mentioned at https://github.com/plataformatec/devise#configuring-controllers). I’d rather not use this because it is a lot of work, brittle, and duplicative.

  2. Use model callbacks. I’d rather not go down this path. I want this to be controller-level code. By that I mean that, at least, I want access to the controller environment. In my mind, this is a controller responsibility. I want this to be testable without having to deal with models.

  3. Override sign_in in my app’s ApplicationController. The problem? This approach can not distinguish between a sign up and a sign in. (Please correct me if this is not accurate?) I say this after skimming the Devise registrations_controller.rb and sessions_controller.rb — both of their create methods call sign_in.

My specific applications are: (a) sending email notices to admins and (b) making API calls to back-end analytic services. Note that neither are model responsibilities — these are controller-level (application-level) responsibilities.

Update 2012-10-16: I’m asking if the Devise project would be open to adding a new hook for sign_up: https://github.com/plataformatec/devise/issues/2104

Update 2012-10-16: I removed “sign out” from this question because that is easy to hook into.

  • 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-06-13T19:54:10+00:00Added an answer on June 13, 2026 at 7:54 pm

    Thanks to a pull request from https://github.com/pootsbook and https://github.com/rubynortheast, the master branch of Devise now supports separate hooks for sign_up and sign_out. So I think will make it into the next release, perhaps 2.1.3.

    See:

    • https://github.com/plataformatec/devise/pull/2111
    • https://github.com/plataformatec/devise/issues/2104
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are some ways that I can query the local machine's specifications (a range
I had used several ways to do some simple integer arithmetic in BASH (3.2).
I am working on some simple form validation and need some assistance. Basically, I
I am looking for some simple library for javascript to manage animations. I need
This is some simple code that draws to the screen. GLuint vbo; glGenBuffers(1, &vbo);
I have some simple constraints involving multiplication of reals in z3 that are producing
What are some simple ways to hash a 32-bit integer (e.g. IP address, e.g.
The objective is to have two simple ways to source some code, say func.R,
I have a simple rails app that I need to deploy on a Window
Doing some exercises with simple file encryption/decryption and am currently just reading in a

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.