Class: Moxie::Topic
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Moxie::Topic
- Defined in:
- app/models/moxie/topic.rb
Instance Method Summary collapse
Instance Method Details
#decrement_forum_topic_count ⇒ Object
28 29 30 31 |
# File 'app/models/moxie/topic.rb', line 28 def decrement_forum_topic_count forum.topic_count -= 1 forum.save end |
#increment_forum_topic_count ⇒ Object
23 24 25 26 |
# File 'app/models/moxie/topic.rb', line 23 def increment_forum_topic_count forum.topic_count += 1 forum.save end |
#remove_posts ⇒ Object
33 34 35 |
# File 'app/models/moxie/topic.rb', line 33 def remove_posts posts.each { |p| p.destroy } end |