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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:39:02+00:00 2026-05-25T02:39:02+00:00

I wanna make a page that contains more than one tables. Each table is

  • 0

I wanna make a page that contains more than one tables. Each table is ajax filtered table that can be sorted using metasearch. This is sorting link for each table.
Controller SomeController:

def index
  @search = FirstTable.search(params[:search])
  @first_tables = @search.all

  @search_second_table = SecondTable.search(params[:search_second_table])
  @second_tables = @search_second_table.all

  ...
end

View:

# First table
sort_link @search, :some_attribute, "Some Attribute"
#=> www.example.com/some_controller?search[meta_sort]=some_attribute.asc

# Second table
sort_link @search_second_table, :some_attribute, "Some Attribute"
#=> www.example.com/some_controller?search[meta_sort]=some_attribute.asc

I have no idea why the sort_link outputting the same link or maybe I’ve made some mistake. Is there anyway to change the output of second_table sort_link to be like this.

#=> www.example.com/some_controller?search_second_table[meta_sort]=some_attribute.asc 

Thx for your help.

  • 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-25T02:39:02+00:00Added an answer on May 25, 2026 at 2:39 am

    solved my problem using link_to. after click “Some Attribute” link, change the “meta_sort” params to desc using jquery, right after ajax response return successfully. link_to "Some Attribute", :controller => "some_controller", :search_second_table => {:meta_sort => "some_attribute.asc"}

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

Sidebar

Related Questions

I have 2 question I wanna make Mysql table that have charset utf8 but
i wanna make really sure, that a user can upload large files to my
Hi guys i am going to make a android game. i wanna know that
I wanna make a query that fetches only the rows that has 'cost' value
Got a chart control i wanna make from a data table. the table looks
Performance consideration: Spread rows in multiple tables vs concentrate all rows in one table.
I wanna make intro page or popup in website with two buttons accept and
I have a php page that has a few HTML questions on it, each
I wanna make the Mel-Frequency Cepstrum Algorithm but there are some things that I
I wanna make this rather simple to ask so I can hope for a

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.