Class: Moxie::Post

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/moxie/post.rb

Instance Method Summary collapse

Instance Method Details

#decrement_topic_post_countObject



27
28
29
30
31
32
# File 'app/models/moxie/post.rb', line 27

def decrement_topic_post_count
  return  if topic.nil?

  topic.post_count -= 1
  topic.save
end

#increment_topic_post_countObject



20
21
22
23
24
25
# File 'app/models/moxie/post.rb', line 20

def increment_topic_post_count
  return  if topic.nil?

  topic.post_count += 1
  topic.save
end