From 558be081b2244ddc4c54fe510435b44edebbb86e Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Tue, 19 Jun 2018 11:14:35 -0700 Subject: [PATCH] don't change attribution of uploads on update --- app/models/upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/upload.rb b/app/models/upload.rb index f4f917470..ca4f1b2be 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -52,7 +52,7 @@ class Upload < ApplicationRecord belongs_to :uploader, :class_name => "User" belongs_to :post, optional: true - before_validation :initialize_attributes + before_validation :initialize_attributes, on: :create before_validation :assign_rating_from_tags validate :uploader_is_not_limited, on: :create # validates :source, format: { with: /\Ahttps?/ }, if: ->(record) {record.file.blank?}, on: :create