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:
Robin Ward
2013-06-13 07:20:55 -07:00
6 changed files with 57 additions and 1 deletions

View File

@@ -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

View File

@@ -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