Search code examples
ruby-on-railsruby-on-rails-3meta-search

rails metasearch sort by nested resource


Can you sort by nested resource with metasearch?

normally, item.customer_id

so sort would be <%= sort_link @search, :customer_id %>

but would like to sort by the customer.first_name


Solution

  • <%= sort_link @search, :customer_first_name %>
    

    should work