<commit_before>module RunsHelper

  def runs_table(runs, redirect_to)
    runs.map do |run|
      workflow = run.workflow
      created_at = run.created_at.strftime("%e %b %Y %H:%M:%S %Z")

      if run.is_a?(Sweep)
        finish_time = run.runs.any? {|r| r.finish_time.blank? } ? '' : run.runs.map { |r| r.finish_time }.max.strftime("%e %b %Y %H:%M:%S %Z")
      else
        finish_time = run.finish_time.blank? ? '' : run.finish_time.strftime("%e %b %Y %H:%M:%S %Z")
      end

      action_buttons = render(:partial => "taverna_player/runs/delete_or_cancel_button", :locals => { :run => run, :redirect_to => redirect_to })
      [link_to("#{image(run.is_a?(Sweep) ? 'sweep_run' : 'simple_run')} #{run.name}".html_safe, run.is_a?(Sweep) ? main_app.sweep_path(run) : taverna_player.run_path(run)),
       link_to(workflow.title, main_app.workflow_path(workflow)),#, :version => run.workflow_version)),
       workflow.category.name,
       "#{run.state} #{(run.complete? ? '' : image_tag('ajax-loader.gif', :style => "vertical-align: middle"))}".html_safe,
       created_at,
       finish_time,
       action_buttons]
    end
  end

end<commit_msg>Fix: default as nil for redirect_to in runs_table method<commit_after>module RunsHelper

  def runs_table(runs, redirect_to=nil)
    runs.map do |run|
      workflow = run.workflow
      created_at = run.created_at.strftime("%e %b %Y %H:%M:%S %Z")

      if run.is_a?(Sweep)
        finish_time = run.runs.any? {|r| r.finish_time.blank? } ? '' : run.runs.map { |r| r.finish_time }.max.strftime("%e %b %Y %H:%M:%S %Z")
      else
        finish_time = run.finish_time.blank? ? '' : run.finish_time.strftime("%e %b %Y %H:%M:%S %Z")
      end

      action_buttons = render(:partial => "taverna_player/runs/delete_or_cancel_button", :locals => { :run => run, :redirect_to => redirect_to })
      [link_to("#{image(run.is_a?(Sweep) ? 'sweep_run' : 'simple_run')} #{run.name}".html_safe, run.is_a?(Sweep) ? main_app.sweep_path(run) : taverna_player.run_path(run)),
       link_to(workflow.title, main_app.workflow_path(workflow)),#, :version => run.workflow_version)),
       workflow.category.name,
       "#{run.state} #{(run.complete? ? '' : image_tag('ajax-loader.gif', :style => "vertical-align: middle"))}".html_safe,
       created_at,
       finish_time,
       action_buttons]
    end
  end

end
{'fraction_non_alphanumeric': 0.1786473840918758, 'fraction_numerical': 0.0, 'mean_word_length': 3.6027397260273974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4007860', 'n_tokens_mistral': 906, 'n_tokens_neox': 897, 'n_words': 149}