diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index b036eb6..001b2ce 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -120,6 +120,10 @@ class ContentViewerController < ApplicationController end end + def self.versioning_articles(article1, article2) + Diffy::Diff.new('article1', 'article2', :source => 'files').to_s(:html) + end + protected def per_page @@ -152,8 +156,6 @@ class ContentViewerController < ApplicationController end - def versioning_articles(article1, article2) - Diffy::Diff.new('article1', 'article2', :source => 'files').to_s(:html) - end + diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 55a066b..1af7e05 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -1195,7 +1195,7 @@ class ContentViewerControllerTest < ActionController::TestCase end should 'display differences between article versions' do - Article.versioning_articles('/files/test.txt','/files/test.txt') + ContentViewerController.versioning_articles('/files/test.txt','/files/test.txt') end should 'not display comments marked as spam' do -- libgit2 0.21.2