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

  • Home
  • SEARCH
  • 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 7641059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:49:40+00:00 2026-05-31T08:49:40+00:00

While I wouldn’t normally create a page like this, please know this is a

  • 0

While I wouldn’t normally create a page like this, please know this is a current constraint I can’t change.

The page has a checkbox form as well as a table with links for THs that sort the table. I need to construct the TH link in a way that it retains the checkbox items already checked.

Checkbox constructed in View with Haml as:

= form_tag movies_path, :method => :get do
Include: 
  - @all_ratings.each do |rating|
    = rating
    = check_box_tag "ratings[#{rating}]", "1", (@ratingsarray.include?(rating) ? true : false)
  = hidden_field_tag 'sort', @sort
  = submit_tag 'Refresh'

Then for the table it has this for the TH


%th{:class => @classrelease_date}  
  %a#release_date_header= link_to "Release Date", movies_path(:sort=>'release_date', :params[:ratings]=>params[:ratings])

Ultimately I want the URL like “/moves/?sort=release_date&Ratings[PG]=1&Ratings[G]=1” where I am spitting out the ratings params back to the page as part of the URL. Or how to I pass the ratings params in any part of page where the existing controller code will read it.

Existing controller code access ratings from checkbox:

params[:ratings]
  • 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-31T08:49:42+00:00Added an answer on May 31, 2026 at 8:49 am

    Since movies_path accepts hash as parameter, you can tailor params and then generate the URL with movies_path(params). Generally, you may need to remove “controller” and “action” from params.

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

Sidebar

Related Questions

While this question has been asked in a variety of contexts before, I can't
I would like to make one of the div's hidden while rendring. After page
This has been bugging me for a while, so I asked a coworker if
I have a function that looks like this: int Game::GetInput() { while (true) {
I've been wondering about this for a while and I can't see why Google
I wonder why something like this wouldn't work (actually doesn't work): 4.php : <php
This has been bothering me for a while. I'm having a little trouble understanding
Well, the title is self-explanatory. I wondered this while compiling a project which has
I would like to show loadingActivity while activity1 is executing some code (working), after
I would like to find a way to see what happens while my XAML

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.