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 6989821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:15:49+00:00 2026-05-27T19:15:49+00:00

I use Devise (1.4.8) for my User model and have been trying to implement

  • 0

I use Devise (1.4.8) for my User model and have been trying to implement a simple beta invitation feature (Rails 3.0.7), following Ryan Bates’s railscast.

I can’t get the [new] method of my devise model’s controller to recognize the invitation token. I suspect this is because I am not succesfully overriding the registrations controller of Devise.

I am assuming instead of the using the user_controller for passing variables from registration form, I have to override devise’s registrations controller. So my registrations_controller.rb in the root of controllers folder:

class RegistrationsController < Devise::RegistrationsController
  def new
    super
    @user = User.new(:invitation_token => params[:invitation_token])
    @user.email = @user.invitation.recipient_email if @user.invitation
  end
end

In routes.rb:

devise_for :users, :controllers => {:registrations => 'registrations'} do
  get 'users/sign_up/:invitation_token' => 'devise/registrations#new', :as => "new_user_registration"
end

In invitation_controller.rb

Mailer.invitation(@invitation, new_user_registration_url+"/#{@invitation.token}").deliver

How I can override Devise’s registration controller and pass the :invitation_token successfully from Devise’s new user form?

  • 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-27T19:15:50+00:00Added an answer on May 27, 2026 at 7:15 pm

    Upon some more research, I found others running into a similar problem:

    • Devise + Omniauth – How to pass extra parameters along?
    • Custom Query Paramaters for Omniauth callbacks

    The real issue was I was trying to pass a variable to one of Omniauth’s callback methods. I was not able to figure out how to do that. As a workaround, I ended up using a session variable and accessed it from within the Omniauth callback method.

    Not very elegant, but did the trick.

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

Sidebar

Related Questions

I have a Rails 3 app that I am trying to implement devise and
I have a Rails 3 app that I am trying to implement devise and
I have a rails app that is using Devise, with a User model, no
I've got a very simple Rails 3 app with a User model run by
I'm building an app in Rails 3. I currently have a user model which
I'm using Devise for my User model and sessions control. I'd like to use
I created a User model using Devise and whenever I use rake db:migrate I
Using devise , I have a User model. I do not have a user
I get the following error trying to use the devise_suspendable gem. /home/graeme/.rvm/gems/ree-1.8.7-2011.03@epra/gems/devise-1.4.5/lib/devise/models.rb:60:in `const_get': uninitialized
Can Active Admin use my current Devise user model? It already has a column

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.