Method: CounterAttribute#counter

Defined in:
app/models/concerns/counter_attribute.rb

#counter(attribute) ⇒ Object



125
126
127
128
129
130
131
# File 'app/models/concerns/counter_attribute.rb', line 125

def counter(attribute)
  strong_memoize_with(:counter, attribute) do
    # This needs #to_sym because attribute could come from a Sidekiq param,
    # which would be a string.
    build_counter_for(attribute.to_sym)
  end
end