Module: ActiveRecord::Translatable::InstanceMethods

Defined in:
lib/translatable.rb

Instance Method Summary collapse

Instance Method Details

#current_translationObject



236
237
238
239
240
241
242
# File 'lib/translatable.rb', line 236

def current_translation
  if translatable_locale_changed?
    @translatable_locale = ::I18n.locale.to_s
    translatable_set_current
  end
  @current_translation
end

#other_translationsObject



244
245
246
# File 'lib/translatable.rb', line 244

def other_translations
  translations - [current_translation]
end