Module: Mongoid::PublishingLogic::Localized

Extended by:
ActiveSupport::Concern
Includes:
Mongoid::PublishingLogic
Defined in:
lib/mongoid/publishing_logic/localized.rb

Constant Summary

Constants included from Mongoid::PublishingLogic

VERSION

Instance Method Summary collapse

Instance Method Details

#published?(locale = I18n.locale) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
62
63
64
65
66
67
# File 'lib/mongoid/publishing_logic/localized.rb', line 59

def published?(locale=I18n.locale)
  locale_was = I18n.locale
  begin
    I18n.locale = locale
    super()
  ensure
    I18n.locale = locale_was
  end
end