settings_on_rails 0.2.1 → 0.2.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: e311010760e4452a33b1a0d0048f5e304a679eb8
4
- data.tar.gz: bf162619d8b3076eaafdf7ce95343ee14f3f278f
3
+ metadata.gz: b3d2546e49211ff3f4772301ea5d8ddad7760e57
4
+ data.tar.gz: 03eb8027cd870ae60d475a1972d15f328df244b2
5
5
  SHA512:
6
- metadata.gz: 1e6f39188ad57d798b91056674978352aea290980a7ced7d7e82a671879ed74b97f97f1ea104864ce200618a77b0d10fa54706385b7b32dcc882c0f15c332e89
7
- data.tar.gz: f1b3a5cb8aa949ab5c57896ca345e19aa1d9bc6b3dbab3207e3acd522ad8d7bb12629205fbde26d558f5be225c704740c3a7fcf83a4edfcbe1c97cad923fbc9d
6
+ metadata.gz: 5b3381b4f813100a6ed5e9adc50de7ec2b165308f6a8738551d679414663d98c84998e27b77d5878fcce28787691212a5616a51079b6e0548adf6f163088ca71
7
+ data.tar.gz: ebaba09d122cdb86617146c60e08b6ebd974bbf9057d0497e4d476bd27a4877c946861a699d67a30d11120ec437604b558edaf2be605b5980bb4bbb14d63089e
@@ -24,7 +24,8 @@ module SettingsOnRails
24
24
  if method_name.to_s =~ REGEX_SETTER && args.size == 1
25
25
  _set_value($1, args.first)
26
26
  elsif method_name.to_s =~ REGEX_GETTER && args.size == 0
27
- _get_value($1) || _default_settings($1)
27
+ value = _get_value($1)
28
+ value.nil? ? _default_settings($1) : value
28
29
  else
29
30
  super
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module SettingsOnRails
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settings_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ALLEN WANG QIANG
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord