How to construct a clickable link with a scope using Ransack and Rails
问题 I have the requirement to have some scopes as clickable links in my application. This will allow the user to change the data they are seeing as required. Using Ransack and it's ransackable_scopes functionality I am very close. I do need to retain any filtering Ransack has done when the user clicks the scope. I've got the scopes working but now I just need to construct the clickable link. Here's my model: class Product < ActiveRecord::Base scope :upward_trending, -> { where( "status > ?", 100)