Why don't you have only one route and one controller action and differ in functionality based on the parameters passed to it?
config /routes.rb:
get 'dashboard', to: 'dashboard#index'
application / controller / dashboard_controller.rb
def index ... if params[:pending] # pending related stuff end if params[:live] # live related stuff end if params[:sold] # sold related stuff end ... end
links in views
- Waiting:
<%= link_to "Pending", dashboard_path(pending: true) %> - live:
<%= link_to "Live", dashboard_path(live: true) %> - sold:
<%= link_to "Sold", dashboard_path(sold: true) %>
source share