activerecord-mlang 0.0.5 → 0.0.6

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: cf207ea098da9f3fd92c5cfe188d582775c6dba0
4
- data.tar.gz: 9c40da1d5ba8a67f2d1e76e6a2883baf8aebef7f
3
+ metadata.gz: cc96cdbf093253128b133b2e05db04eb641c9b63
4
+ data.tar.gz: e991fdbbc2b94853eabfa31dc252ebdd8b9a5cdf
5
5
  SHA512:
6
- metadata.gz: c5ae9d993666bf7456999d8b601f301a3bae3e1634ff3a1b1ad7c390cdbf41be1175c335d5e682e8b4602043a56d487c84152745fe6bd0f0e971a351b177e3f0
7
- data.tar.gz: bafb199672722d5688097c8bbf9ef811d4907f90d5db40d11095ca51cedd594fcb9d84001670f02b1ab48841c05a6fe0af4e917ac7f55d00aa3b298a5d48f0af
6
+ metadata.gz: 5f73a39be9d4e06ee3340d861a9d1fb4b48e2a2df73b4ec62c45abc314ba9c60674bd9b529133a3e07c2fedb2840fa9ad4b3b88d291f42c8082cf3c33549ab50
7
+ data.tar.gz: 49fe1aadbacd582979fc8773d2e800b2cc4eab2ca8c01d6ab416affe7c742da440498f3a33a78e64fe50a6a24d45e8d99ace7265e3960fea87bd9a984ad622db
@@ -53,7 +53,7 @@ module ActiveRecord
53
53
 
54
54
  def text(locale=nil)
55
55
  locale ||= I18n.default_locale
56
- if lang = Lang[locale]
56
+ if self.persisted? && lang = Lang[locale]
57
57
  texts.find_or_create_by(lang_id: lang.id)
58
58
  else
59
59
  nil
@@ -1,5 +1,5 @@
1
1
  module Activerecord
2
2
  module Mlang
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-mlang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinjiro Itagaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler