module I17n
Public Class Methods
method_missing(*args)
click to toggle source
# File lib/i17n.rb, line 17 def self.method_missing(*args) I18n.send(args[0], *args.drop(1)) end
t(*args)
click to toggle source
# File lib/i17n.rb, line 3 def self.t(*args) if args[0].respond_to?(:model_name) if args[1] && args[1].is_a?(Symbol) args[0].human_attribute_name(*args.drop(1)) else args[0].model_name.human(*args.drop(1)) end elsif args[0].is_a?(Symbol) I18n.t("app.#{args[0]}", *args.drop(1)) else I18n.t(*args) end end