From 14689a4f1363fc4a8fa2790ee1c15e70dad65b20 Mon Sep 17 00:00:00 2001 From: Wojciech Kocjan <wojciech@kocjan.org> Date: Tue, 19 Mar 2013 17:15:14 +0100 Subject: [PATCH] Logging in with username and password does not work in prefixed discourse --- app/helpers/application_helper.rb | 4 ++++ app/views/layouts/application.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f25ee5929..616c1567f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -65,4 +65,8 @@ module ApplicationHelper def privacy_path return "#{Discourse::base_uri}/privacy" end + + def login_path + return "#{Discourse::base_uri}/login" + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6a905f1fe..49e0b8036 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -22,7 +22,7 @@ <body> <% unless current_user %> - <form id='hidden-login-form' method="post" action="/login" style="display: none;"> + <form id='hidden-login-form' method="post" action="<%=login_path%>" style="display: none;"> <input name="username" type="text" id="signin_username"> <input name="password" type="password" id="signin_password"> <input name="redirect" type="hidden">