-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Rails 4.2 compatibility: parameters of LocalizedMapping initializer super(...) have changed #47
Comments
This patch seems to work: diff --git a/lib/i18n_routing_rails4.rb b/lib/i18n_routing_rails4.rb
index 74f7cb4..c836ee0 100644
--- a/lib/i18n_routing_rails4.rb
+++ b/lib/i18n_routing_rails4.rb
@@ -131,8 +131,8 @@ module I18nRouting
if !@set.named_routes.respond_to?(:define_localized_url_helper)
@set.named_routes.class_eval <<-END_EVAL, __FILE__, __LINE__ + 1
alias_method :localized_define_url_helper, :define_url_helper
- def define_url_helper(route, name, options)
- localized_define_url_helper(route, name, options)
+ def define_url_helper(route, name, options, components, route_name, route_set)
+ localized_define_url_helper(route, name, options, components, route_name, route_set)
define_localized_url_helper(route, name, options)
end
END_EVAL My simple example works (output 'rake routes'). Unfortunately, then all tests fail due to other errors, like 'match' being deprecated for 'get'. I'll try to fix those and then report back here. |
I tried, but I got lost because the parameter naming (and numbering, and, it seems contents) of
have changed a lot. See for example rails/rails@3b908cb. Can anybody have a look? Thanks! |
I now use this gem |
I actually got my fork working with rails 4.2 (well, at least resource routes, but normal named routes were not working anymore since rails 4 anyway). We look up translations a bit differently in our branch, but if anyone is interested i can let you know what I patched. |
I only need normal named routes to be translated. But anyway, maybe I can get it running. What did you patch? Thanks :) |
Any info would be appreciated! |
For named routes we have this in an initializer:
We then use
Works well. |
When trying out this gem in a new Rails 4.2 app, I get
Any idea what this might be?
I'm using the rails4 branch of 'ncri' (which unfortunately doesn't have an issue tracker, so I post it here).
The text was updated successfully, but these errors were encountered: