translatable 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.4
data/lib/translatable.rb CHANGED
@@ -200,7 +200,11 @@ module ActiveRecord
200
200
 
201
201
  self.module_eval <<-RUBY, __FILE__, __LINE__ + 1
202
202
  def translatable_set_current
203
- @current_translation = translations.where(:#{@translatable[:locale]} => @translatable_locale).first
203
+ @current_translation = if translations.loaded?
204
+ translations.select { |t| t.send(:"#{@translatable[:locale]}") == @translatable_locale }
205
+ else
206
+ translations.where(:"#{@translatable[:locale]}" => @translatable_locale)
207
+ end.first
204
208
  end
205
209
  protected :translatable_set_current
206
210
  RUBY
data/translatable.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "translatable"
8
- s.version = "0.2.2"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["E-Max"]
12
- s.date = "2012-09-23"
12
+ s.date = "2013-03-05"
13
13
  s.description = "This game was build to make whole proccess of working with translation for DM to be almost invisble. That was THE AIM."
14
14
  s.email = "max@studentify.nl"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-23 00:00:00.000000000Z
12
+ date: 2013-03-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &81412010 !ruby/object:Gem::Requirement
16
+ requirement: &85333360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *81412010
24
+ version_requirements: *85333360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: i18n
27
- requirement: &81411770 !ruby/object:Gem::Requirement
27
+ requirement: &85333030 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *81411770
35
+ version_requirements: *85333030
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yard
38
- requirement: &81411530 !ruby/object:Gem::Requirement
38
+ requirement: &85332600 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *81411530
46
+ version_requirements: *85332600
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &81411290 !ruby/object:Gem::Requirement
49
+ requirement: &85332350 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *81411290
57
+ version_requirements: *85332350
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &81411050 !ruby/object:Gem::Requirement
60
+ requirement: &85332090 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.0.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *81411050
68
+ version_requirements: *85332090
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
- requirement: &81410810 !ruby/object:Gem::Requirement
71
+ requirement: &85331710 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.6.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *81410810
79
+ version_requirements: *85331710
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rcov
82
- requirement: &81410570 !ruby/object:Gem::Requirement
82
+ requirement: &85331450 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: 1.0.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *81410570
90
+ version_requirements: *85331450
91
91
  description: This game was build to make whole proccess of working with translation
92
92
  for DM to be almost invisble. That was THE AIM.
93
93
  email: max@studentify.nl
@@ -128,9 +128,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  - - ! '>='
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
- segments:
132
- - 0
133
- hash: -89848195
134
131
  required_rubygems_version: !ruby/object:Gem::Requirement
135
132
  none: false
136
133
  requirements: