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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:59:13+00:00 2026-06-07T03:59:13+00:00

We have website with adult content. If user visit site first time, we need

  • 0

We have website with adult content. If user visit site first time, we need to show him message “If you’re 18 years old you can enter.” and “Enter” button. How can I show this page once and if user click on enter, show him homepage?

  • 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-07T03:59:15+00:00Added an answer on June 7, 2026 at 3:59 am

    This is an ideal situation to store something in the user’s session, and redirect them based on whether or not that something is set. Have a before_filter in your application_controller.rb that looks like this:

    before_filter :check_age
    
    private
    
    def check_age
      return true if session[:age_check]
      redirect_to age_verification_path
    end
    

    In your age verification controller, set session[:age_check] to true if the user clicks on a link. Then the before_filter will let them access the site as you’d expect.

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

Sidebar

Related Questions

I have website, and i need to fetch content from some pages on another
I have website that shows user submitted content in 30+ languages in front page,I
I have website that use XMLHttpRequest (jQuery, actually). I also have another site running
I have website, where I first set ::selection { background: transparent; } ::-moz-selection {
I have website that will both post to a user's Facebook wall, and allow
I Have website I need to save a large amount of pages from. The
What if I have website with a button. User clicks on the button and
I have website that uses ASP.net Membership Provider. This web site will be served
i have website with text area where user pastes text which looks like this:
Lets say you have website that keeps balance for each user. You give each

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.