Sha256: 162469adcdd4bc087aa875e872352faf15546048c22ec9ec5de964096a38c1a8

Contents?: true

Size: 516 Bytes

Versions: 37

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Admin
    module ElementsHelper
      include Alchemy::Admin::IngredientsHelper

      # Returns an elements array for select helper.
      #
      # @param [Array] elements definitions
      # @return [Array]
      #
      def elements_for_select(elements)
        return [] if elements.nil?

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

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
alchemy_cms-7.1.13 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.16 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.12 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.15 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.11 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.10 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.9 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.14 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.13 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.8 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.7 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.12 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.11 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.6 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.5 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.10 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.4 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.0.9 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.3 app/helpers/alchemy/admin/elements_helper.rb
alchemy_cms-7.1.2 app/helpers/alchemy/admin/elements_helper.rb