Sha256: 6fb15dbe13f333926a7bd4095c378b7d63cb51e60dcc4c9350a2ab2524ea0abc

Contents?: true

Size: 303 Bytes

Versions: 1

Compression:

Stored size: 303 Bytes

Contents

module RailsLiveDashboard
  class Job < Entry
    attribute :content, Types::JobContent.new

    scope :same, ->(job_id) { where("content->>'job_id' = ?", job_id) }

    def performed?
      content.status == 'performed'
    end

    def discarted?
      content.status == 'discarted'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_live_dashboard-0.2.0 app/models/rails_live_dashboard/job.rb