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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:29:42+00:00 2026-06-12T04:29:42+00:00

My RoR app requires users to tick a Terms & Conditions checkbox before uploading

  • 0

My RoR app requires users to tick a “Terms & Conditions” checkbox before uploading content.

What I’d like to do is to display the “Terms & Conditions” content in a very simple pop-up tab, as implemented here (and without the need for jQuery or any other libraries which, for reasons I won’t bore you with, I’d like to avoid) but, being a Rails noob, I’m having difficulties identifying an appropriate, as well as “clean” solution.

The non-Rails HTML is as follows (I’ve dealt with the JavaScript):

<a href="popup_content.htm" onclick="popUp(this.href,'console',400,200); 
return false;" target="_blank">Link which opens popup</a>

My issues are as follows:

  1. Where do I store the HTML file containing the Terms and Conditions
    text?
  2. How do I use link_to to provide a link to the popup in the related
    form?

Beginning with my first query, I need to create a plain HTML page (popup_content), which will only contain an heading (Terms and Conditions) and paragraph content within a

element. I have a static pages controller, but I don’t think it’s appropriate to create a terms and conditions View here, as it’ll mean the page will be rendered as a standard page with menus and such, as per my other static pages. I tried placing a simple _terms.html.erb page in the Layouts folder, but this returned an error message when the page was opened in the popup.

So which folder should I put this HTML file into?

I think I’ve solved my second query, but I’m not sure I’m using the link_to Helper correctly:

link_to "Click me to display terms and conditions", "[wherever the resultant file should be]/terms.html", :onclick => "javascript function to display the popup", :target => "_blank"

Any advice would be useful – Cheers!

  • 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-12T04:29:43+00:00Added an answer on June 12, 2026 at 4:29 am

    You can use the link_to_function to show the popup: (See documentation here)

    “Returns a link whose onclick handler triggers the passed JavaScript.”

    In your case:

    link_to_function 'Term&Conditions', "popUp('/popups/_terms_conditions.html', 'console', 400, 200);"
    

    With this you would have to create a directory ‘popups’ like this: app/views/popups, and a partial view “_terms_conditions.html”

    Hope this works for you!

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

Sidebar

Related Questions

I would like to have an editable spreadsheet on my RoR app where users
I have a method like this in my RoR 3 app def buscar array
I'm developing a very basic RoR app that will essentially only be used by
My RoR app needs to checkout the file from local git server and display
I have a ROR app and I would like a little help regarding parsing
I started deploying my latest RoR app on Heroku , which required me to
I have this RoR app that calls to RAILS_ROOT. When running it using rails
I'm working on a RoR app, but this is a general question of strategy
I have recently moved my RoR app on the Heroku platform, and almost everything
I am deploying my first ROR app with MongoDB. I've noticed that if the

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.