Sha256: ec323e3c65ac75e2055214e28e490c80d4d5b5d8716162469b9f0022e4eeacf1

Contents?: true

Size: 475 Bytes

Versions: 3

Compression:

Stored size: 475 Bytes

Contents

require 'subj_models/concerns/comprising_external_id'

module SubjModels

  module Video

    def self.included(including_class)

      including_class.class_eval do

        include SubjModels::ComprisingExternalId

        belongs_to :document_file
        belongs_to :brand

        scope :brand_id, -> brand { where(brand_id: brand) }
        scope :is_promo, -> condition { where(is_promo: condition) }

      end

    end

    def to_s
      id.to_s
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
subj_models-0.4.1 lib/subj_models/video.rb
subj_models-0.4 lib/subj_models/video.rb
subj_models-0.3.8 lib/subj_models/video.rb