localizable_routes 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f8374dfa7c9a91261a56553e473740dd0b92a05
4
- data.tar.gz: a2e536dd07bdfeb01de5982437ec7bc8e5435a25
3
+ metadata.gz: 95fe22b3c719d1404ec2a3343f8cd5e09dfef4b1
4
+ data.tar.gz: c5d642c35888e8309db2ae60ace00562fa7f5b75
5
5
  SHA512:
6
- metadata.gz: 2e644402dbaf020ff3e1b4d59a4455ac0118e532648be5f7b74dd47d4695c03b983bcd7964ce2f57a90a83f7ff79fe300fe408a141120928a12ff95e58de598b
7
- data.tar.gz: dbec00c99deb8234de2bdd8ef1ef10637a75e9f22e8adddd68ffbc8793de56e01df83a5786fdbef6188f72319e21fa7ead244c1fba3457eae5f3741e97749182
6
+ metadata.gz: 9ea7f4df35838d767213c37bae7d178e347cecce18a17e634ead940b7bc64127084b1e29eca92b515ec0bdce2301fc3067468804e690080d798dd0d5999306b8
7
+ data.tar.gz: 004dd6a6969b8e1a565f8cabdbf42be031eb116a2ebe5300d9de500634c9f2b5d4b483cd628d39fb67a9f7e4b617dacd02b6b2fc280e5c2fa293064a5e13a93f
@@ -14,20 +14,12 @@ module LocalizableRoutes
14
14
  options = args.extract_options!
15
15
  strategy = localization[:strategy]
16
16
  if strategy == :param
17
- locale = (
18
- options[:locale] ||
19
- url_options.try(:fetch, :locale, nil) ||
20
- I18n.locale
21
- )
17
+ locale = options[:locale]
22
18
  else
23
- key = (
24
- options[strategy] ||
25
- url_options.try(:fetch, strategy, nil) ||
26
- try(:request).try(strategy)
27
- )
19
+ key = options[strategy]
28
20
  locale = localization[:locales][key.to_s]
29
21
  end
30
- send "#{name}_#{locale}_#{type}", *(args << options)
22
+ send "#{name}_#{locale || I18n.locale}_#{type}", *(args << options)
31
23
  end
32
24
  end
33
25
  instance_variable_get("@#{type}_helpers") << helper
@@ -1,5 +1,5 @@
1
1
  module LocalizableRoutes
2
2
 
3
- VERSION = '5.1.1'
3
+ VERSION = '5.1.2'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localizable_routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmontossi