Sha256: 8520659ea98dc632c2f38ad4919a1c5debaeeabdb111941b28eca9a0616120dd
Contents?: true
Size: 444 Bytes
Versions: 25
Compression:
Stored size: 444 Bytes
Contents
class PolyImage < ActiveRecord::Base belongs_to :imageable, polymorphic: true counter_culture :imageable counter_culture :imageable, column_name: 'poly_images_count_dup' counter_culture :imageable, column_name: ->(i){i.special? ? 'special_poly_images_count' : nil }, column_names: { ["poly_images.url LIKE ?", '%special%'] => 'special_poly_images_count', } def special? url && url.include?('special') end end
Version data entries
25 entries across 25 versions & 1 rubygems