From 597f8e379262dc93302dc39d8dd52b5894c06650 Mon Sep 17 00:00:00 2001 From: yasushiito Date: Thu, 11 Oct 2012 07:56:10 +0900 Subject: [PATCH] t#29806:fix;picture revision can be up --- app/models/picture.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/picture.rb b/app/models/picture.rb index a4b9e38b..4669b4b3 100644 --- a/app/models/picture.rb +++ b/app/models/picture.rb @@ -21,11 +21,12 @@ class Picture < ActiveRecord::Base end def overwrite rp - attr = {:revision => self.new_revision,:width => rp.width, :height => rp.height, :ext => rp.ext, :filesize => rp.filesize, + attr = {:width => rp.width, :height => rp.height, :ext => rp.ext, :filesize => rp.filesize, :original_picture_id => rp.original_picture_id, :license_id => rp.license_id, :artist_id => rp.artist_id, :md5 => rp.md5, :artist_name => rp.artist_name, :classname => rp.classname, :credit => rp.credit, :settings => rp.settings } self.attributes = attr + self.revision = self.new_revision #Do not move to attr. new_revision reffernces self.original_picture_id end def own? author -- 2.11.0