Class: Krant::TranslatedBroadcastMessage::Query Private
- Inherits:
-
Object
- Object
- Krant::TranslatedBroadcastMessage::Query
- Defined in:
- app/models/krant/translated_broadcast_message.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #active ⇒ Object private
Instance Method Details
#active ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/krant/translated_broadcast_message.rb', line 16 def active scope = BroadcastMessage.active scope = with_translation(scope, 'current_locale', I18n.locale) scope = with_translation(scope, 'default_locale', I18n.default_locale) scope.map do || TranslatedBroadcastMessage.new(.current_locale_text.presence || .default_locale_text) end end |