From 4c95405ba1d6ad21fd8186ded568210ed1425e31 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Tue, 19 Nov 2013 16:48:34 +0000 Subject: [PATCH] rails3: return article object on copy instead of true/false --- app/models/article.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/app/models/article.rb b/app/models/article.rb index 27f8353..04a8d26 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -523,6 +523,7 @@ class Article < ActiveRecord::Base object.send(key.to_s+'=', value) end object.save + object end def copy!(options = {}) @@ -533,6 +534,7 @@ class Article < ActiveRecord::Base object.send(key.to_s+'=', value) end object.save! + object end ATTRIBUTES_NOT_COPIED = [ -- libgit2 0.21.2