Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:format is not supported (formerly "Rails 3 Support") #1

Open
markrebec opened this issue Jun 17, 2013 · 2 comments
Open

:format is not supported (formerly "Rails 3 Support") #1

markrebec opened this issue Jun 17, 2013 · 2 comments
Labels

Comments

@markrebec
Copy link
Owner

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).

@markrebec markrebec mentioned this issue Jun 17, 2013
Merged
@markrebec
Copy link
Owner Author

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.

@markrebec
Copy link
Owner Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant