module TranslatedAttributeValue::Base::InstanceMethods

Public Instance Methods

method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/translated_attribute_value/base.rb, line 14
def method_missing(name, *args, &block)
  attribute_name = name.to_s.gsub!(/_translated$/, '') # this will return nil or the modified string
  if (attribute_name) && self.respond_to?(attribute_name)
    self.class.translated_value_for(attribute_name)
    self.send(name)
  else
    super
  end
end