Add localhost as name to initfest domains (#44)

Before this change if someone is using `localhost` for development instead of `127.0.0.1`, he would get a missing template error.

Reviewed-on: #44
Co-authored-by: Tocho Tochev <tocho@tochev.net>
Co-committed-by: Tocho Tochev <tocho@tochev.net>
This commit is contained in:
Tocho Tochev 2024-06-01 12:30:16 +03:00 committed by Petko Bordjukov
parent 486a763277
commit d44738bf58
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ class ApplicationController < ActionController::Base
# TODO: make this get the domain from the database # TODO: make this get the domain from the database
prepend_view_path "lib/initfest/views" if request.host =~ /openfest/ prepend_view_path "lib/initfest/views" if request.host =~ /openfest/
prepend_view_path "lib/initfest/views" if request.host =~ /example/ prepend_view_path "lib/initfest/views" if request.host =~ /example/
prepend_view_path "lib/initfest/views" if request.host =~ /127\.0\.0/ prepend_view_path "lib/initfest/views" if request.host =~ /^127\.0\.0/
prepend_view_path "lib/initfest/views" if request.host =~ /^localhost$/
end end
protected protected