mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #1019 from ZogStriP/reverse-index-of-user-uploads
added a reverse index of user uploads + rake task
This commit is contained in:
@@ -26,6 +26,8 @@ class Post < ActiveRecord::Base
|
||||
has_many :replies, through: :post_replies
|
||||
has_many :post_actions
|
||||
|
||||
has_and_belongs_to_many :upload
|
||||
|
||||
has_one :post_search_data
|
||||
|
||||
validates_with ::Validators::PostValidator
|
||||
|
||||
@@ -7,6 +7,8 @@ class Upload < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
belongs_to :topic
|
||||
|
||||
has_and_belongs_to_many :post
|
||||
|
||||
validates_presence_of :filesize
|
||||
validates_presence_of :original_filename
|
||||
|
||||
|
||||
Reference in New Issue
Block a user