Merge pull request #136 from geoffharcourt/geoffharcourt-issue_135
Only define Impressionable::ClassMethods::DEFAULT_CACHE when undefined
This commit is contained in:
commit
71b081c749
|
@ -5,7 +5,11 @@ module Impressionist
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
attr_accessor :impressionist_cache_options
|
attr_accessor :impressionist_cache_options
|
||||||
|
|
||||||
DEFAULT_CACHE = { :counter_cache => false, :column_name => :impressions_count, :unique => false }
|
DEFAULT_CACHE ||= {
|
||||||
|
:counter_cache => false,
|
||||||
|
:column_name => :impressions_count,
|
||||||
|
:unique => false
|
||||||
|
}
|
||||||
|
|
||||||
def impressionist_counter_cache_options
|
def impressionist_counter_cache_options
|
||||||
@impressionist_cache_options ||= {}
|
@impressionist_cache_options ||= {}
|
||||||
|
|
Loading…
Reference in New Issue