diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index 123703e..df25ff2 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -13,8 +13,7 @@ class ContentViewerController < ApplicationController if path.blank? @page = profile.home_page if @page.nil? - @tags = profile.tags - render :template => 'profile/index' + redirect_to :controller => 'profile', :action => 'index', :profile => profile.identifier return end else diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 7125a64..52e7e79 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -816,10 +816,10 @@ class ContentViewerControllerTest < Test::Unit::TestCase assert_no_tag :tag => 'div', :attributes => { :id => 'article-source' } end - should 'render profile screen when there is no homepage' do + should 'redirect to profile controller when there is no homepage' do profile.home_page.destroy get :view_page, :profile => profile.identifier, :page => [] - assert_template 'profile/index' + assert_redirected_to :controller => 'profile', :action => 'index', :profile => profile.identifier end should "not display 'Upload files' when viewing blog" do -- libgit2 0.21.2