FEATURE: show the user's flagged/deleted posts

This commit is contained in:
Régis Hanol
2014-07-16 21:04:55 +02:00
parent 71c67c43a1
commit 7dcf2a2c4f
18 changed files with 395 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ class Post < ActiveRecord::Base
belongs_to :user
belongs_to :topic, counter_cache: :posts_count
belongs_to :reply_to_user, class_name: "User"
has_many :post_replies
@@ -40,6 +41,8 @@ class Post < ActiveRecord::Base
has_many :post_revisions
has_many :revisions, foreign_key: :post_id, class_name: 'PostRevision'
has_many :user_actions, foreign_key: :target_post_id
validates_with ::Validators::PostValidator
# We can pass several creating options to a post via attributes