module HstoreTranslate::Translates::ActiveRecordWithHstoreTranslate

Public Instance Methods

method_missing(method_name, *args) click to toggle source
Calls superclass method
# File lib/hstore_translate/translates/active_record_with_hstore_translates.rb, line 9
def method_missing(method_name, *args)
  translated_attr_name, locale, assigning = parse_translated_attribute_accessor(method_name)

  return super(method_name, *args) unless translated_attr_name

  if assigning
    write_hstore_translation(translated_attr_name, args.first, locale)
  else
    read_hstore_translation(translated_attr_name, locale)
  end
end
respond_to?(symbol, include_all = false) click to toggle source
Calls superclass method
# File lib/hstore_translate/translates/active_record_with_hstore_translates.rb, line 4
def respond_to?(symbol, include_all = false)
  return true if parse_translated_attribute_accessor(symbol)
  super(symbol, include_all)
end