i18n_rails_helpers 0.15.1 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/i18n_rails_helpers/version.rb +1 -1
- data/lib/i18n_rails_helpers.rb +3 -3
- metadata +5 -5
data/lib/i18n_rails_helpers.rb
CHANGED
@@ -21,11 +21,11 @@ module I18nRailsHelpers
|
|
21
21
|
#
|
22
22
|
def t_attr(attribute, model = nil)
|
23
23
|
if model.is_a? Class
|
24
|
-
|
24
|
+
model_class = model
|
25
25
|
elsif model.nil?
|
26
|
-
|
26
|
+
model_class = controller_name.classify.constantize
|
27
27
|
end
|
28
|
-
|
28
|
+
model_class.human_attribute_name(attribute)
|
29
29
|
end
|
30
30
|
|
31
31
|
# Returns translated name for the given +model+.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_rails_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 95
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 16
|
9
|
+
- 0
|
10
|
+
version: 0.16.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-11-
|
18
|
+
date: 2011-11-04 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|