:format is not supported (formerly "Rails 3 Support")
markrebec opened this issue · 2 comments
This started out as a ticket about Rails 3 support, but has evolved to track support of the :format
path part variable within excursion.
There is currently one last blocking issue preventing excursion from being compatible with rails 3 - The call to ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper
in /lib/excursion/helpers/url_helper.rb
.
This class is not part of action_dispatch in rails 3, and the routing/url helpers are such a mess that I'm having a hell of a time trying to figure out the best way to handle the argument replacement (and would rather not completely rebuild the logic within excursion).
Some initial work to get rails3 support working has been done in 598afa8
The :format
property is completely unsupported for rails3 in this solution, and it's extremely hacky. More work should be done to figure out how to better leverage the action dispatch route mapping in rails 3.
ab60015 made a switch to using the Excursion::Helpers::UrlHelper#replaced_path
method and uniform calls to the base ActionDispatch::Http::URL.url_for
helper method for Rails 3 and 4.
This means two things:
- This is no longer a Rails 3 specific issue. It introduces the
:format
argument problem into Rails 4, which is bad, but it means we're using the same logic all around, which is good. - I need to put a bit more time into the path part replacement (specifically the
:format
argument).