Sha256: 4d007d1336e6674368474ae2b77c1c987fb8fddeed83ed572f6eb800b61b492c

Contents?: true

Size: 442 Bytes

Versions: 11

Compression:

Stored size: 442 Bytes

Contents

module Rearview
  class UrlHelper
    def self.job_url(job)
      dashboard_id = if job.dashboard.root?
                      job.app_id
                     else
                      job.dashboard.parent.id
                     end
      [ Rails.application.routes.url_helpers.rearview_url(Rearview.config.default_url_options),
        "#dash",
        "#{dashboard_id}",
        "expand",
        "#{job.id}" ].join("/")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby lib/rearview/url_helper.rb
rearview-1.2.2.rc.2-jruby lib/rearview/url_helper.rb
rearview-1.2.2.rc.1-jruby lib/rearview/url_helper.rb
rearview-1.2.1-jruby lib/rearview/url_helper.rb
rearview-1.2.0-jruby lib/rearview/url_helper.rb
rearview-1.1.2-jruby lib/rearview/url_helper.rb
rearview-1.1.1-jruby lib/rearview/url_helper.rb
rearview-1.1.0-jruby lib/rearview/url_helper.rb
rearview-1.0.3.rc.4-jruby lib/rearview/url_helper.rb
rearview-1.0.3.rc.3-jruby lib/rearview/url_helper.rb
rearview-1.0.3.rc.2-jruby lib/rearview/url_helper.rb