air18n 0.1.52 → 0.1.53

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.
@@ -5,6 +5,8 @@ module Air18n
5
5
  belongs_to :phrase
6
6
  belongs_to :user
7
7
 
8
+ has_one :phrase_revision, :foreign_key => 'value_hash', :primary_key => 'source_hash'
9
+
8
10
  validates_presence_of :key, :locale
9
11
 
10
12
  scope :locale, lambda {|loc| { :conditions => ['locale = ?', loc.to_s] } }
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.1.52"
2
+ VERSION = "0.1.53"
3
3
  end
@@ -31,6 +31,16 @@ describe Air18n::PhraseTranslation do
31
31
  original_translation.source_word_count.should == 4
32
32
  original_translation.source_hash.should == "b60188f9fd5c5b5e63a412501bd464a2"
33
33
  end
34
+
35
+ it "should have a PhraseRevision relation" do
36
+ phrase_value = 'phrase translation phrase revision phrase value'
37
+ phrase = FactoryGirl.create(:phrase,
38
+ :key => 'phrase translation phrase revision phrase key',
39
+ :value => phrase_value)
40
+ phrase.save!
41
+ original_translation = FactoryGirl.create(:phrase_translation, :phrase => phrase)
42
+ original_translation.phrase_revision.value.should == phrase_value
43
+ end
34
44
  end
35
45
 
36
46
  context 'validations' do
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.1.52
4
+ version: 0.1.53
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-01-17 00:00:00.000000000 Z
16
+ date: 2013-01-18 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  version: '0'
220
220
  requirements: []
221
221
  rubyforge_project:
222
- rubygems_version: 1.8.24
222
+ rubygems_version: 1.8.22
223
223
  signing_key:
224
224
  specification_version: 3
225
225
  summary: Dynamic I18n backend