Sha256: e7fcce4cde00b86217fdd483589ab77e9ec54ebfd86e0fbf09e3cdaf737cffc5

Contents?: true

Size: 419 Bytes

Versions: 69

Compression:

Stored size: 419 Bytes

Contents

module Ecom
  module Core
    class WorkProductTemplate < ApplicationRecord
      validates :code, :name, presence: true, uniqueness: true
      belongs_to :task_template
      has_many :product_types

      scope :filtered_by_template_type, lambda { |id|
        joins(:task_template).where('ecom_core_task_templates.task_template_type_id = ?', id)
                             .order(:code)
      }
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
ecom_core-1.2.14 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.13 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.12 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.11 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.10 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.9 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.7 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.6 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.5 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.4 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.3 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.2 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.1 app/models/ecom/core/work_product_template.rb
ecom_core-1.2.0 app/models/ecom/core/work_product_template.rb
ecom_core-1.1.28 app/models/ecom/core/work_product_template.rb
ecom_core-1.1.27 app/models/ecom/core/work_product_template.rb
ecom_core-1.1.26 app/models/ecom/core/work_product_template.rb
ecom_core-1.1.25 app/models/ecom/core/work_product_template.rb
ecom_core-1.1.24 app/models/ecom/core/work_product_template.rb
ecom_core-1.1.23 app/models/ecom/core/work_product_template.rb