easy_globalize3_accessors 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module EasyGlobalize3Accessors
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -4,7 +4,10 @@ require 'globalize3'
4
4
  module EasyGlobalize3Accessors
5
5
 
6
6
  def globalize_accessors(options = {})
7
- options.reverse_merge!(:locales => I18n.available_locales, :attributes => translated_attribute_names)
7
+ # Temporary workaround for bug: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5522-model-classes-are-loaded-before-i18n-is-set-when-running-tests
8
+ default_locales = defined?(Rails) ? Rails.configuration.i18n.available_locales : I18n.available_locales
9
+
10
+ options.reverse_merge!(:locales => default_locales, :attributes => translated_attribute_names)
8
11
 
9
12
  each_attribute_and_locale(options) do |attr_name, locale|
10
13
  define_accessors(attr_name, locale)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 0
9
- version: 1.1.0
8
+ - 1
9
+ version: 1.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tomasz Stachewicz
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-02-01 00:00:00 +01:00
20
+ date: 2011-02-02 00:00:00 +01:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency