Sha256: c9036e979b962a13d39c9d045e3d96bb9d7636c626116ca4dc70aae83c1ba896
Contents?: true
Size: 421 Bytes
Versions: 5
Compression:
Stored size: 421 Bytes
Contents
module Ecom module Model 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_model_task_templates.task_template_type_id = ?', id) .order(:code) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems