Sha256: 1a880d24070a92f0f92f6b1b2cad506256fc854975974f94f494777986e65859

Contents?: true

Size: 322 Bytes

Versions: 26

Compression:

Stored size: 322 Bytes

Contents

module ForemanTemplatesHelper
  def edit_paths
    Template.subclasses.reduce({}) do |memo, subclass|
      memo.tap do |acc|
        path_part = "#{subclass.name.underscore.pluralize}_path"
        acc[subclass.name] = "#{Rails.application.routes.url_helpers.public_send(path_part)}/:id/edit"
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
foreman_templates-10.0.4 app/helpers/foreman_templates_helper.rb
foreman_templates-10.0.3 app/helpers/foreman_templates_helper.rb
foreman_templates-10.0.2 app/helpers/foreman_templates_helper.rb
foreman_templates-10.0.1 app/helpers/foreman_templates_helper.rb
foreman_templates-10.0.0 app/helpers/foreman_templates_helper.rb
foreman_templates-9.5.1 app/helpers/foreman_templates_helper.rb
foreman_templates-9.5.0 app/helpers/foreman_templates_helper.rb
foreman_templates-9.3.3 app/helpers/foreman_templates_helper.rb
foreman_templates-9.3.2 app/helpers/foreman_templates_helper.rb
foreman_templates-9.3.1 app/helpers/foreman_templates_helper.rb
foreman_templates-9.4.0 app/helpers/foreman_templates_helper.rb
foreman_templates-9.3.0 app/helpers/foreman_templates_helper.rb
foreman_templates-9.2.0 app/helpers/foreman_templates_helper.rb
foreman_templates-9.1.0 app/helpers/foreman_templates_helper.rb
foreman_templates-9.0.2 app/helpers/foreman_templates_helper.rb
foreman_templates-9.0.1 app/helpers/foreman_templates_helper.rb
foreman_templates-9.0.0 app/helpers/foreman_templates_helper.rb
foreman_templates-7.0.7 app/helpers/foreman_templates_helper.rb
foreman_templates-8.0.0 app/helpers/foreman_templates_helper.rb
foreman_templates-7.0.6 app/helpers/foreman_templates_helper.rb