Sha256: 702c0447ec549b02aeec79941201d9c737e1c20760e9b0ec1f618eca11513f9a

Contents?: true

Size: 310 Bytes

Versions: 13

Compression:

Stored size: 310 Bytes

Contents

class ConditionalDependent < ActiveRecord::Base
  belongs_to :conditional_main

  counter_culture :conditional_main,
    column_name: Proc.new {|m| m.condition? ? 'conditional_dependents_count' : nil },
    column_names: { ['conditional_dependents.condition = ?', true] => 'conditional_dependents_count' }
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
counter_culture-0.2.0 spec/models/conditional_dependent.rb
counter_culture-0.1.34 spec/models/conditional_dependent.rb
counter_culture-0.1.33 spec/models/conditional_dependent.rb
counter_culture-0.1.32 spec/models/conditional_dependent.rb
counter_culture-0.1.31 spec/models/conditional_dependent.rb
counter_culture-0.1.30 spec/models/conditional_dependent.rb
counter_culture-0.1.29 spec/models/conditional_dependent.rb
counter_culture-0.1.28 spec/models/conditional_dependent.rb
counter_culture-0.1.27 spec/models/conditional_dependent.rb
counter_culture-0.1.26 spec/models/conditional_dependent.rb
counter_culture-0.1.25 spec/models/conditional_dependent.rb
counter_culture-0.1.24 spec/models/conditional_dependent.rb
counter_culture-0.1.23 spec/models/conditional_dependent.rb