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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:46:20+00:00 2026-05-26T23:46:20+00:00

On core website I use standard Devise configuration for user authentication. In routes.rb: devise_for

  • 0

On core website I use standard Devise configuration for user authentication. In routes.rb:

devise_for :users

Now, I have a namespace, lets call it “frame”, being used for display some views via some controllers in small window (or iframe) on remote page.
I need to authenticate user inside the frame, therefore I nested devise_for declaration:

namespace :frame do
  devise_for :users
  resources :albums, :only => :show do
    resources :photos, :only => [:new, :create, :show]
  end
end

To make the whole thing work I needed to create proper controller:

class Frame::SessionsController < ::Devise::SessionsController
  layout "frame"
end

And now I use the following path to display form:

new_frame_user_session_path

HOWEVER. When I logged in via frame, *current_user* is nil, and I have *current_frame_user* instead. It’s bad, because the user logged in via core website (*current_user*) should be available via frame and reverse (in one browser).

Is there a little tweak to achive it or I should change the whole approach? Thank You for help.

  • 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-26T23:46:21+00:00Added an answer on May 26, 2026 at 11:46 pm

    The solution was for me to change the log-in form in views/frame/sessions/new.html.haml.

    Instead of:

    = simple_form_for resource, :as => resource_name, :url => session_path(resource_name) do |f|
    

    I needed to overwrite resource name:

    = simple_form_for resource, :as => :user, :url => session_path(:user) do |f|
    

    Now I am able to log-in within the frame and the user’s session is coherent between the frame and the rest of the site.

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

Sidebar

Related Questions

Part of our core product is a website CMS which makes use of various
I have solution which has webSite and Core projects. In Core I have all
Is there any website which provides core java based programming challenges that tests programming
I did several websites with Drupal, and now the core is updated and I
Fedora Core 9 seems to have FCGID instead of FastCGI as a pre-built, YUM-managed
I have a quad core machine and would like to write some code to
I have a core file generated on a remote system that I don't have
I am creating a website with multiple sections--admin, client, user, and anonymous--each user group
I'd like to use jquery.ui's class transition animations on my website. Everything works fine
Well I was reading the Core Data tutorial for iOS on Apple's website and

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.