Sha256: 8f0f8a9b0aad00acbdb5ed85666809a0779c04686c9d5e5cf5cfc59b77ba18aa

Contents?: true

Size: 389 Bytes

Versions: 9

Compression:

Stored size: 389 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('; ')
      parts.join(" ")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman-tasks-0.7.5 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.4 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.3 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.2 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.1 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.0 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.15 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.14 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.6.13 app/helpers/foreman_tasks/tasks_helper.rb