Sha256: 0a7599e9183792bbafffaedbf85bda6550a2364cc883c32bfe11f99f3427351c

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

class Review < ActiveRecord::Base
  belongs_to :user
  belongs_to :product

  counter_culture :product
  counter_culture :product, :column_name => 'rexiews_count'
  counter_culture :user
  counter_culture :user, :column_name => Proc.new { |model| model.review_type ? "#{model.review_type}_count" : nil }, :column_names => {"reviews.review_type = 'using'" => 'using_count', "reviews.review_type = 'tried'" => 'tried_count'}
  counter_culture [:user, :company]
  counter_culture [:user, :company, :industry]
  counter_culture [:user, :company, :industry], :column_name => 'rexiews_count'
  counter_culture [:user, :company, :industry], :column_name => Proc.new { |model| "#{model.review_type}_count" }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
counter_culture-0.1.6 spec/models/review.rb