module MagicAddresses::Translator::ClassMethods

C L A S S - M E T H O D S # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

Public Instance Methods

mgca_translate( field = :name ) click to toggle source
# File lib/app/models/magic_addresses/translator.rb, line 12
def mgca_translate( field = :name )
  send :include, InstanceMethods
  
  translates field, fallbacks_for_empty_translations: true
  accepts_nested_attributes_for :translations, reject_if: proc { |attributes| attributes[field.to_s].blank? }
end