Sha256: e9f766f371300f55dccc57e7a3535d07fa18d21bf333e39d66a39d0f77cbae5e
Contents?: true
Size: 410 Bytes
Versions: 5
Compression:
Stored size: 410 Bytes
Contents
# frozen_string_literal: true class Rating < ActiveRecord::Base belongs_to :comment has_many :taggings, as: :taggable has_many :taggings_without_tag, -> { left_joins(:tag).where("tags.id": [nil, 0]) }, as: :taggable, class_name: "Tagging" has_many :taggings_with_no_tag, -> { joins("LEFT OUTER JOIN tags ON tags.id = taggings.tag_id").where("tags.id": nil) }, as: :taggable, class_name: "Tagging" end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ibm_db-5.5.0 | test/models/rating.rb |
ibm_db-5.4.1 | test/models/rating.rb |
ibm_db-5.4.0 | test/models/rating.rb |
ibm_db-5.3.2 | test/models/rating.rb |
ibm_db-5.3.1 | test/models/rating.rb |