i18n_rails_helpers 1.4.3 → 1.4.4
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/app/helpers/i18n_helpers.rb +2 -5
- data/lib/i18n_rails_helpers/version.rb +1 -1
- metadata +1 -1
data/app/helpers/i18n_helpers.rb
CHANGED
@@ -36,7 +36,7 @@ module I18nHelpers
|
|
36
36
|
# t_model(Account.new) => 'Konto'
|
37
37
|
# t_model => 'Konto' # when called in patients_controller views
|
38
38
|
#
|
39
|
-
def t_model(model = nil
|
39
|
+
def t_model(model = nil)
|
40
40
|
if model.is_a? Class
|
41
41
|
model_name = model.name.underscore
|
42
42
|
elsif model.nil?
|
@@ -44,10 +44,7 @@ module I18nHelpers
|
|
44
44
|
else
|
45
45
|
model_name = model.class.name.underscore
|
46
46
|
end
|
47
|
-
|
48
|
-
options[:scope] = [:activerecord, :models]
|
49
|
-
options[:count] ||= 1
|
50
|
-
I18n::translate(model_name, *options)
|
47
|
+
I18n::translate(model_name, :scope => [:activerecord, :models])
|
51
48
|
end
|
52
49
|
|
53
50
|
# Returns translated title for current +action+ on +model+.
|