-
Notifications
You must be signed in to change notification settings - Fork 148
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
Nondeterministic behavior causing asset pipeline problems? #49
Comments
It seems to me that the problem is that Rails.application.routes.named_routes.routes is a Hash and so no order is implied. Would it be reasonable to sort this, e.g. in alphabetical order by key name, when it is needed? |
Yes, seems reasonable. Btw are you using 1.8 or 1.9? This can make a big difference in how Hash works. |
1.8.7 Alex Sent from my iPhone On Jun 14, 2012, at 3:12 AM, Bogdan Gusievreply@reply.github.com wrote:
|
So, all you need is add js_routes = Rails.application.routes.named_routes.routes.sort.map do |_, route| I don't want to commit this to master until make sure it fixes your problem |
1 similar comment
So, all you need is add js_routes = Rails.application.routes.named_routes.routes.sort.map do |_, route| I don't want to commit this to master until make sure it fixes your problem |
Hi, I'm seeing a problem while including js-routes in the asset pipeline in a Rails 3.2.3. We have two app servers which are precompiling assets. The signatures do not match between the compiled js on the two app servers and it looks like there is a difference in the order of the named routes that are being generated in the compiled javascript. I haven't looked too deeply into the code yet, but is it possible that this is a bug? I will investigate further tomorrow morning, but please point me in the right direction if this sounds possible.
Thanks,
Alex
The text was updated successfully, but these errors were encountered: