Module: Alchemy::Admin::ElementsHelper

Includes:
ContentsHelper, EssencesHelper
Defined in:
app/helpers/alchemy/admin/elements_helper.rb

Instance Method Summary collapse

Methods included from EssencesHelper

#edit_picture_dialog_size, #essence_picture_thumbnail

Methods included from ContentsHelper

#content_label, #render_content_name

Methods included from BaseHelper

#alchemy_body_class, #alchemy_datepicker, #button_with_confirm, #clipboard_select_tag_options, #current_alchemy_user_name, #delete_button, #hint_with_tooltip, #js_filter_field, #link_to_confirm_dialog, #link_to_dialog, #link_url_regexp, #new_asset_path_with_session_information, #page_layout_missing_warning, #render_alchemy_title, #render_hint_for, #sites_for_select, #toolbar_button, #translations_for_select

Methods included from NavigationHelper

#alchemy_main_navigation_entry, #entry_active?, #main_navigation_css_classes, #navigate_module, #sorted_alchemy_modules, #url_for_module, #url_for_module_sub_navigation

Methods included from BaseHelper

#message_icon_class, #page_or_find, #render_flash_notice, #render_icon, #render_message, #shorten, #warning

Instance Method Details

#elements_for_select(elements) ⇒ Array

Returns an elements array for select helper.

Parameters:

  • elements (Array)

    definitions

Returns:

  • (Array)

14
15
16
17
18
19
20
21
22
23
# File 'app/helpers/alchemy/admin/elements_helper.rb', line 14

def elements_for_select(elements)
  return [] if elements.nil?

  elements.collect do |e|
    [
      Element.display_name_for(e["name"]),
      e["name"],
    ]
  end
end