I have a helper method:
def my_helper(builder, name, order)
options = {
builder.search_key => builder.search_attributes.merge('sort' => order)
}
link_to name, url_for(options)
end
The helper adds some parameters (here a simplified example) to the current url and build link. When I try to test this method with RSpec, I get an exception ActionController::RoutingError: No route matches {:search=>{"sort"=>"published_at.asc"}}. How can I drown out the current link, path, controller, action?
source
share