From d44738bf58b07ef3e9127b18ad0a617f9a45438c Mon Sep 17 00:00:00 2001 From: Tocho Tochev Date: Sat, 1 Jun 2024 12:30:16 +0300 Subject: [PATCH] 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: https://git.openfest.org/Site/clarion/pulls/44 Co-authored-by: Tocho Tochev Co-committed-by: Tocho Tochev --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1d4c000..581c6ad 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -33,7 +33,8 @@ class ApplicationController < ActionController::Base # 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 =~ /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 protected