has_setting 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5340ef7ba3b423b9a015293fa81e9f7e765bf719
4
- data.tar.gz: 2f3c8490135a7908af0378dc11d8a172b3836e2f
3
+ metadata.gz: fcd273ff228a9458fcbf258477f6bf309a67b1d8
4
+ data.tar.gz: d04409c08792279490a8e2df7b42a9b8a4be874e
5
5
  SHA512:
6
- metadata.gz: b6f50d4b7af489834fedb1c2f74d2d9a6c38a7ea9c081b4534607a31d7f5b0a5dc1db8468396d50be28c3a5fadbf7b6f84a6e1be07b1d6c7b4dcb061a58d848d
7
- data.tar.gz: e3b5546df57b9dc0a913b4a0d4998c5531fb6cf85743b366bd4f7111756e6b6a393f7ec6c3e2e3bb21e6e32471b9c6c2efb1640b8d57a58e0a86ef97d52327c3
6
+ metadata.gz: dff3dd2c4471a1fa7d3106d09348c2ac93de4ae2cc089ff07138e942bba08d4700f4732a195f3b528499af5894a3146cc3ba7321887ee9b21ae3bae41d17ceb7
7
+ data.tar.gz: f6d45f3ea98d6a69c10301b7dc8d9581e9e4ba88dfb56139dc85dcc0a6b1cafa7a23f8dfe52473ab12b8a5f65a66ad3535ddbaeb3f6c9d49f0062fe6816db5af
@@ -64,7 +64,7 @@ module HasSetting
64
64
  def read_setting(name)
65
65
  # use detect instead of SQL find. like this the 'cached' has_many-collection is inited
66
66
  # only once
67
- locale = localize?(name) ? I18n.locale.to_s : nil
67
+ locale = localize?(name) ? I18n.locale.to_s : ""
68
68
  s = self.settings.detect() {|item| item.name == name and item.locale.to_s == locale} # first see if there is a setting with current locale
69
69
  s ||= self.settings.detect() {|item| item.name == name} # then if not found, take the first setting with matching name (TODO: add locale fallbacks)
70
70
  s
@@ -1,3 +1,3 @@
1
1
  module HasSetting
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_setting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simplificator GmbH