3scale/porta

View on GitHub
app/inputs/handler_input.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

# CMS
class HandlerInput < Formtastic::Inputs::SelectInput
  def options
    super.merge(collection: handlers)
  end

  def include_blank
    true
  end

  private

  def handlers
    CMS::Handler.available.map { |h| [h.to_s.humanize, h] }
  end
end