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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:43:15+00:00 2026-06-04T21:43:15+00:00

I have a signin lightbox that needs to be shown when user is not

  • 0

I have a signin lightbox that needs to be shown when user is not logged in. The lightbox is completely implemented in javascript, fancybox and uses rails partials for html.

I can see the cookie is set in chrome when logged in, but document.cookie seems to return empty. The reason probably has been explained here

How do I achieve this in javascript / erb.

  • 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-04T21:43:17+00:00Added an answer on June 4, 2026 at 9:43 pm

    Handle this in the backend. If you’re doing this with rails, be sure to use and abuse current_user, because it will be your best friend.

    Then in your partial, you’re free to have something like this

    <% if current_user %>
         <p>Welcome <%= current_user.username %>!</p>
    <% else %>
         <p>Please <%= link_to 'sign in', login_path %></p>
    <% end %>
    

    Rails Sessions, Ruby on Rails Tutorial

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

Sidebar

Related Questions

I have a class that needs access to two other classes. Signin needs access
I have a CustomeAuthorize action filter that forwards the user to signin page if
I have a Rails 3 App. When the user is not signed in... I
I have a website that uses OpenID to sign in users. The library I'm
I have two models User and Admin(with RailsAdmin) that use Devise. I sign in
I have some code that is accessing Membership.GetUser() to get the current logged in
I have a problem that when a user times out on my site they
I have the following form: <form:form method=POST action=signin.dlp commandName=user > <form:input path=useremail id=useremail /><FONT
I have written some JavaScript that opens an element when an element is clicked.
I have an action that resets a user's password. In that same action after

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.