module DataMapper::Is::Translatable::InstanceMethods
Protected Instance Methods
current_translation()
click to toggle source
# File lib/dm-translatable.rb, line 209 def current_translation if translatable_locale_changed? @translatable_locale = ::I18n.locale.to_s @current_translation = translations.first(:locale => @translatable_locale) end @current_translation end
translatable_locale_changed?()
click to toggle source
# File lib/dm-translatable.rb, line 205 def translatable_locale_changed? @translatable_locale.to_s != ::I18n.locale.to_s end