class SchemaRD::Utils::SchemaLocalizer
Public Class Methods
new(lang, hash)
click to toggle source
Calls superclass method
SchemaRD::Utils::Localizer::new
# File lib/schemard/utils/localizer.rb, line 33 def initialize(lang, hash) super(lang) @hash = hash end
Public Instance Methods
column_name(table_name, column_name)
click to toggle source
# File lib/schemard/utils/localizer.rb, line 43 def column_name(table_name, column_name) self.t("activerecord.attributes.#{table_name.singularize}.#{column_name}") end
dictionary()
click to toggle source
# File lib/schemard/utils/localizer.rb, line 37 def dictionary @hash end
table_name(name)
click to toggle source
# File lib/schemard/utils/localizer.rb, line 40 def table_name(name) self.t("activerecord.models.#{name.singularize}") end