For some reason default url for sort_link is always pointing to /orders/populate?controller=&action=
I want it as whatever default route i have configured on routes.rb
if sort_link is a route you defined yourself then try using this "main_app.sort_link" =)
Take a look here from more info Adding Routes to Rails' Spree E-Commerce