diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index 181863c..9711506 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -227,6 +227,10 @@ class AccountController < ApplicationController render :partial => 'identifier_status' end + def user_menu + # nothing + end + protected def redirect? diff --git a/app/views/account/user_menu.rjs b/app/views/account/user_menu.rjs new file mode 100644 index 0000000..aacc18d --- /dev/null +++ b/app/views/account/user_menu.rjs @@ -0,0 +1 @@ +page.replace_html 'user_box', :file => 'shared/user_menu' diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 1f4fd5c..4e19cc9 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -102,7 +102,12 @@
- <%= render :file => 'shared/user_menu' %> + <%# WARNING this is a horrible hack while we don't have an actual SSO system. %> + <% if environment.enable_ssl && request.host != environment.default_hostname %> + <%= content_tag 'script', '', :type => 'text/javascript', :src => environment.top_url(true) + '/account/user_menu' %> + <% else %> + <%= render :file => 'shared/user_menu' %> + <% end %>
69) do t.boolean "virtual", :default => false end - add_index "articles_categories", ["category_id"], :name => "index_articles_categories_on_category_id" add_index "articles_categories", ["article_id"], :name => "index_articles_categories_on_article_id" + add_index "articles_categories", ["category_id"], :name => "index_articles_categories_on_category_id" create_table "blocks", :force => true do |t| t.string "title" @@ -284,6 +284,10 @@ ActiveRecord::Schema.define(:version => 69) do t.integer "environment_id" end + create_table "schema_info", :id => false, :force => true do |t| + t.integer "version" + end + create_table "taggings", :force => true do |t| t.integer "tag_id" t.integer "taggable_id" @@ -291,8 +295,8 @@ ActiveRecord::Schema.define(:version => 69) do t.datetime "created_at" end - add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" create_table "tags", :force => true do |t| t.string "name" diff --git a/test/integration/categories_menu_test.rb b/test/integration/categories_menu_test.rb index f960ac0..43408fd 100644 --- a/test/integration/categories_menu_test.rb +++ b/test/integration/categories_menu_test.rb @@ -35,7 +35,7 @@ class CategoriesMenuTest < ActionController::IntegrationTest end should 'cache the categories menu' do - ActionView::Base.any_instance.expects(:cache).with(Environment.default.name + "_categories_menu") + ActionView::Base.any_instance.expects(:cache).with(Environment.default.id.to_s + "_categories_menu") get '/' end diff --git a/test/integration/user_registers_at_the_application_test.rb b/test/integration/user_registers_at_the_application_test.rb index 780cba9..a049f0c 100644 --- a/test/integration/user_registers_at_the_application_test.rb +++ b/test/integration/user_registers_at_the_application_test.rb @@ -10,10 +10,6 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest get '/account/signup' - # going SSL - assert_response :redirect - follow_redirect! - assert_response :success post '/account/signup', :user => { :login => 'mylogin', :password => 'mypassword', :password_confirmation => 'mypassword', :email => 'mylogin@example.com' } @@ -36,10 +32,6 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest get '/account/signup' - # going SSL - assert_response :redirect - follow_redirect! - assert_response :success post '/account/signup', :user => { :login => 'ze', :password => 'mypassword', :password_confirmation => 'mypassword', :email => 'mylogin@example.com' } -- libgit2 0.21.2