Module: Locomotive::Concerns::ContentEntry::Counter

Extended by:
ActiveSupport::Concern
Included in:
Locomotive::ContentEntry
Defined in:
app/models/locomotive/concerns/content_entry/counter.rb

Instance Method Summary collapse

Instance Method Details

#dec_number_of_entriesObject



20
21
22
# File 'app/models/locomotive/concerns/content_entry/counter.rb', line 20

def dec_number_of_entries
  self.content_type.inc(number_of_entries: -1)
end

#inc_number_of_entriesObject



16
17
18
# File 'app/models/locomotive/concerns/content_entry/counter.rb', line 16

def inc_number_of_entries
  self.content_type.inc(number_of_entries: 1)
end