air18n 0.4.0 → 0.4.1

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.
data/lib/air18n/phrase.rb CHANGED
@@ -43,8 +43,10 @@ module Air18n
43
43
  end
44
44
  end
45
45
 
46
- val = @by_key[lookup]
47
- val
46
+ # Check if maybe this key has been created since @by_key was initialized.
47
+ @by_key[lookup] ||= Phrase.find_by_key(lookup)
48
+
49
+ @by_key[lookup]
48
50
  end
49
51
 
50
52
  # phrases that have no corresponding phrase translations by human
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-02-21 00:00:00.000000000 Z
16
+ date: 2013-02-26 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n