module MagicAddresses::Translator::InstanceMethods
I N S T A N C E - M E T H O D S # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Public Class Methods
included(base)
click to toggle source
need to be loaded so stupid, otherwise it is accessible for all model (tested with rspec)
# File lib/app/models/magic_addresses/translator.rb, line 32 def self.included(base) base.send :extend, MoreClassMethods end
Public Instance Methods
with_translations(*locales)
click to toggle source
# File lib/app/models/magic_addresses/translator.rb, line 26 def with_translations(*locales) locales = translated_locales if locales.empty? includes(:translations).with_locales(locales).with_required_attributes end