Class: Locomotive::ContentLocalePickerCell

Inherits:
Cell::Base
  • Object
show all
Defined in:
app/cells/locomotive/content_locale_picker_cell.rb

Instance Method Summary collapse

Instance Method Details

#show(args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'app/cells/locomotive/content_locale_picker_cell.rb', line 8

def show(args)
  site    = args[:site]
  @locale = args[:locale].to_s

  if site.locales.empty? || site.locales.size < 2
    ''
  else
    @locales = site.locales
    render
  end
end