Commit 4c95405ba1d6ad21fd8186ded568210ed1425e31

Authored by Rodrigo Souto
1 parent 48fc7d7f

rails3: return article object on copy instead of true/false

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
app/models/article.rb
@@ -523,6 +523,7 @@ class Article < ActiveRecord::Base @@ -523,6 +523,7 @@ class Article < ActiveRecord::Base
523 object.send(key.to_s+'=', value) 523 object.send(key.to_s+'=', value)
524 end 524 end
525 object.save 525 object.save
  526 + object
526 end 527 end
527 528
528 def copy!(options = {}) 529 def copy!(options = {})
@@ -533,6 +534,7 @@ class Article < ActiveRecord::Base @@ -533,6 +534,7 @@ class Article < ActiveRecord::Base
533 object.send(key.to_s+'=', value) 534 object.send(key.to_s+'=', value)
534 end 535 end
535 object.save! 536 object.save!
  537 + object
536 end 538 end
537 539
538 ATTRIBUTES_NOT_COPIED = [ 540 ATTRIBUTES_NOT_COPIED = [