Sha256: cc8e60cdc6969c17af8690299de302b31acee670b8bc5b57158b9191e0bd0448

Contents?: true

Size: 730 Bytes

Versions: 3

Compression:

Stored size: 730 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 ? "#{model.review_type}_count" : nil }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
counter_culture-0.1.9 spec/models/review.rb
counter_culture-0.1.8 spec/models/review.rb
counter_culture-0.1.7 spec/models/review.rb