Sha256: f1d3d5267d45f6589667312e4b7649ca03115f672b1b870cb241bbbb4dc4372e

Contents?: true

Size: 308 Bytes

Versions: 1

Compression:

Stored size: 308 Bytes

Contents

module MissionControl::Jobs::JobScoped
  extend ActiveSupport::Concern

  included do
    before_action :set_job, except: :index
  end

  private
    def set_job
      @job = jobs_relation.find_by_id!(params[:job_id] || params[:id])
    end

    def jobs_relation
      raise NotImplementedError
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mission_control-jobs-0.1.0 app/controllers/concerns/mission_control/jobs/job_scoped.rb