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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:54:57+00:00 2026-05-31T19:54:57+00:00

Probably a basic question, but new to Rails and web programming and haven’t found

  • 0

Probably a basic question, but new to Rails and web programming and haven’t found a good answer in researching through this site.

Across four pages and three controllers and one database, starting at the home page(pages controller): pick-up 2 params (in a form_for) that will be used in the fourth page to find in records in a database table, and one variable(set in a hidden field) that will be used to determine which information is displayed in the fourth page. On clicking submit, move to a second and third page(categories controller) to pick-up two more params(one on each page) in link_to’s, before moving to the 4th page (products controller) where the variable from the home page is used to determine which information from the products table is to display.

What is the best way and syntax in the link_to to pick-up these params and variable and move them across the controllers and pages? Where would I define this variable?

  • 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-31T19:54:58+00:00Added an answer on May 31, 2026 at 7:54 pm

    You have a couple of different choices of a “storage” area that can be used across requests.

    • cookies
    • session
    • query string

    The first two are probably the easiest.

    I’d probably lean towards the session since thats what it meant for.

    If you store this data in the session than you dont have to bother with making sure this data is kept in URLs (so it rules out having to make link_to helpers), that is, the data is always available in the controllers. Of course, have sane fallback mechanisms if you’re expecting session data to be set and for whatever reason it is no longer set.

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

Sidebar

Related Questions

This is probably a really basic question, but I'm new to this and relying
This is probably a very basic question, but I'm really new to generics in
This is probably a pretty basic question, but just something that I wanted to
Problem : This is a probably a very basic question, but how do I
This is probably a basic question, better explained through code: public void checkStatus {
This is probably a very basic question; I always see make new document with
This is probably a simple question for you JAVA experts, but I'm relatively new,
Excuse what is probably a really basic question but how do I achieve this.
This is probably a basic question, since I'm new to WPF.. I have a
I realize that this is probably a very basic question, but I have spent

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.