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

WIP: Update asset routes #3629

Closed
wants to merge 4 commits into from
Closed

WIP: Update asset routes #3629

wants to merge 4 commits into from

Conversation

chrisroos
Copy link
Contributor

No description provided.

TODO: Improve this commit message.

It also avoids a potential problem of a path containing multiple
periods. Imagine /government/uploads/file.name.png. params[:path] would
contain `file`, params[:extension] would contain 'name' and
params[:format] would contain 'png'. With this change, params[:path]
contains 'file.name' and params[:format] contains 'png'.
As per the Route globbing and wildcard segments docs[1]:

> If you want to make the format segment mandatory, so it cannot be
omitted, you can supply  format: true like this:

We'd already made format mandatory by including the :format dynamic
segment in the route.

[1]:
http://guides.rubyonrails.org/routing.html#route-globbing-and-wildcard-segments
@chrisroos
Copy link
Contributor Author

I'm abandoning this approach and going to fold this work into PR #3627.

@chrisroos chrisroos closed this Dec 20, 2017
@chrisroos chrisroos deleted the update-asset-routes branch December 20, 2017 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant