engine/app/cells/locomotive/content_locale_picker_cell.rb

15 lines
275 B
Ruby
Raw Normal View History

class Locomotive::ContentLocalePickerCell < Cell::Base
def show(args)
site = args[:site]
locale = args[:locale].to_s
if site.locales.empty? || site.locales.size < 2
''
else
@locales = site.locales - [locale]
render
end
end
end