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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:17:17+00:00 2026-06-18T08:17:17+00:00

A complete rails beginner here. How do I go about handling a query string

  • 0

A complete rails beginner here.
How do I go about handling a query string in rails?
For example for:
http://www.something.com/movie?sort=title

For implementing the the view in the haml file, how can I make it so that clicking on Movie title will send that query string,
And more importantly how do I handle it. Where should I implement the function which can access that query string using :params .

I have been on this for more than a day now and could not understand whether that query string will call a controller function or a module from helper.

I hope I was clear enough about the question.
Any help will be appreciated.

PS:- there is a movie table with title as one of its column.

  • 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-18T08:17:17+00:00Added an answer on June 18, 2026 at 8:17 am

    Not sure I really understand what you want. Does this suit you?

    link_to "My Link", movie_index_path(sort: :title)
    

    Then access param with params[:sort] ?

    (Accord movie_index_path with your routes configuration)

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

Sidebar

Related Questions

I've been trying to complete this tutorial here: http://rubysource.com/building-your-first-rails-application-models/ (as well as compared with
I followed below tutorial and built one whole complete app. http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/ http://www.tonyamoyal.com/2010/09/29/rails-authentication-with-devise-and-cancan-part-2-restful-resources-for-administrators/comment-page-2/#comment-879 All is
Complete beginner to Rails here: In Rails: I have a Model Post, which hasmany
Complete new person to Ruby and Rails here... Have tried some tutorials in the
I'm a complete rails beginner and I'm trying to understand the full concepts. I've
I use rails 3.0.3 A javascript auto complete needs data like this { query:'Li',
I'm a complete Rails newbie and I have a Rails Question about controllers and
Preface: I consider myself slightly effective in ruby on rails, and a complete novice
Complete C++ i18n gettext() hello world example has C++ code that works for a
complete noob to Haskell here with probably an even noobier question. I'm trying to

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.