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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:26:51+00:00 2026-06-11T09:26:51+00:00

In rails, if I am using devise for a table users, it creates a

  • 0

In rails, if I am using devise for a table “users”, it creates a global variable current_user which is used throughout the code. I want to add a similar global variable (current_auth_user) without touching the devise code. Whats the best way to do that?

  • 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-11T09:26:52+00:00Added an answer on June 11, 2026 at 9:26 am

    In your application controller you can just add a helper method

    class ApplicationController < ActionController::Base
      helper_method :current_auth_user
    
      protected
    
      def current_auth_user
        return whatever
      end
    
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to suspend users in my Rails application. I am using Devise. I
My Rails 3 app is using Devise and I noticed that my users table
I'm using Rails 3 with devise. I have a table books which has a
I have a rails application, and I authenticate users to the application using Devise.
I am using Rails 3 and Devise to create an app where users arrive
I'm using rails 3.1.3 and devise 1.5.3 and when I add destroy_user_session_path to my
I'm using rails 2.3.5 and devise 1.0.6. I'm having users confirm account's with email.
I'm using rails 3 with devise. I have a User table with fields: email,
I am using Devise in Rails to help authenticate users. I am trying to
I am using devise for my users. I recently installed the rails Active Admin

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.