From d5aef626d6310f73f4b837e00948432807b65bdd Mon Sep 17 00:00:00 2001 From: Daniela Feitosa Date: Mon, 21 Apr 2014 19:02:27 +0000 Subject: [PATCH] Added attr created_by on copy when approve article --- app/models/approve_article.rb | 2 +- test/unit/forum_helper_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/approve_article.rb b/app/models/approve_article.rb index 7f7fa4a..28f477e 100644 --- a/app/models/approve_article.rb +++ b/app/models/approve_article.rb @@ -48,7 +48,7 @@ class ApproveArticle < Task end def perform - article.copy!(:name => name, :abstract => abstract, :body => body, :profile => target, :reference_article => article, :parent => article_parent, :highlighted => highlighted, :source => article.source, :last_changed_by_id => article.author_id) + article.copy!(:name => name, :abstract => abstract, :body => body, :profile => target, :reference_article => article, :parent => article_parent, :highlighted => highlighted, :source => article.source, :last_changed_by_id => article.last_changed_by_id, :created_by_id => article.created_by_id) end def title diff --git a/test/unit/forum_helper_test.rb b/test/unit/forum_helper_test.rb index f54f015..680615b 100644 --- a/test/unit/forum_helper_test.rb +++ b/test/unit/forum_helper_test.rb @@ -38,7 +38,7 @@ class ForumHelperTest < ActiveSupport::TestCase should 'return post update if it has no comments' do author = create_user('forum test author').person - some_post = create(TextileArticle, :name => 'First post', :profile => profile, :parent => forum, :published => true, :last_changed_by => author) + some_post = create(TextileArticle, :name => 'First post', :profile => profile, :parent => forum, :published => true, :created_by => author) assert some_post.comments.empty? out = last_topic_update(some_post) assert_match some_post.updated_at.to_s, out -- libgit2 0.21.2