lib/alchemy/page_layout.rb in alchemy_cms-2.5.3.1 vs lib/alchemy/page_layout.rb in alchemy_cms-2.6.0.rc5

- old
+ new

@@ -52,27 +52,29 @@ end end # Returns page layouts ready for Rails' select form helper. def layouts_for_select(language_id, layoutpage = false) - map_layouts(selectable_layouts(language_id, layoutpage), [[I18n.t("Please choose"), ""]]) + map_layouts(selectable_layouts(language_id, layoutpage), [[I18n.t('Please choose'), '']]) end def layouts_with_own_for_select(own_layout, language_id, layoutpage) layouts = selectable_layouts(language_id, layoutpage) if layouts.detect { |l| l['name'] == own_layout } == nil - map_array = [[I18n.t(own_layout, :scope => 'page_layout_names'), own_layout]] + map_array = [ + [I18n.t(own_layout, scope: 'page_layout_names', default: own_layout.to_s.humanize), own_layout] + ] else map_array = [] end map_layouts(layouts, map_array) end # Maps given layouts for Rails select form helper. def map_layouts(layouts, map_array = []) layouts.each do |layout| map_array << [ - I18n.t(layout['name'], :scope => 'page_layout_names'), + I18n.t(layout['name'], scope: 'page_layout_names', default: layout['name'].to_s.humanize), layout["name"] ] end map_array end