Module: Kuhsaft::Cms::AdminHelper
- Defined in:
- app/helpers/kuhsaft/cms/admin_helper.rb
Instance Method Summary collapse
Instance Method Details
#link_to_content_locale(locale) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/kuhsaft/cms/admin_helper.rb', line 8 def link_to_content_locale(locale) action = params[:action] if params[:action] == 'create' action = 'new' elsif params[:action] == 'update' action = 'edit' end link_to locale.to_s.upcase, url_for( action: action, content_locale: locale) end |
#render_language_switch? ⇒ Boolean
4 5 6 |
# File 'app/helpers/kuhsaft/cms/admin_helper.rb', line 4 def render_language_switch? I18n.available_locales.size > 1 end |