diff --git a/app/controllers/themes_controller.rb b/app/controllers/themes_controller.rb index 606e75c..c12ec08 100644 --- a/app/controllers/themes_controller.rb +++ b/app/controllers/themes_controller.rb @@ -12,7 +12,7 @@ class ThemesController < ApplicationController def index @environment = environment - @themes = environment.themes + Theme.approved_themes(target) + @themes = (environment.themes + Theme.approved_themes(target)).sort_by { |t| t.name } @current_theme = target.theme diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb index a277dbb..d971faf 100644 --- a/test/functional/application_controller_test.rb +++ b/test/functional/application_controller_test.rb @@ -233,7 +233,7 @@ class ApplicationControllerTest < ActionController::TestCase get :index assert_tag :tag => 'div', :attributes => { :id => 'theme-test-panel' }, :descendant => { - :tag => 'a', :attributes => { :href => '/myprofile/testinguser/themes/edit/my-test-theme'} + :tag => 'a', :attributes => { :href => '/myprofile/testinguser/profile_themes/edit/my-test-theme'} } #{ :tag => 'a', :attributes => { :href => '/myprofile/testinguser/themes/stop_test/my-test-theme'} } end -- libgit2 0.21.2