Sha256: 0c07c5ba2e38d0c133952cde1941553873da6ae914d33eaf6b86e610ff302ffa

Contents?: true

Size: 392 Bytes

Versions: 38

Compression:

Stored size: 392 Bytes

Contents

module ForemanTasks
  module TasksHelper
    def format_task_input(task, include_action = false)
      parts = []
      parts << task.humanized[:action] if include_action
      parts << Array(task.humanized[:input]).map do |part|
        if part.is_a? Array
          part[1][:text]
        else
          part.to_s
        end
      end.join('; ')
      h(parts.join(" "))
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
foreman-tasks-0.6.12 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.11 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.10 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.9 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.8 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.7 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.6 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.5 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.4 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.3 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.2 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.1 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.0 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.7 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.6 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.5 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.4 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.3 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.2 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.5.1 app/helpers/foreman_tasks/tasks_helper.rb