mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
route to conference#show for custom domain
This commit is contained in:
parent
1a5aa14e2c
commit
0ac5d18ef2
5 changed files with 30 additions and 6 deletions
|
|
@ -9,10 +9,17 @@ class ConferencesController < ApplicationController
|
|||
@antiquated = @conferences - @current
|
||||
end
|
||||
|
||||
def show; end
|
||||
def show
|
||||
# have to change "localhost" to ENV['OSEM_HOSTNAME'] in production
|
||||
check_custom_domain if request.host != 'localhost'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def check_custom_domain
|
||||
@conference = @conference.custom_domain.present? ? Conference.find_by(custom_domain: request.domain) : @conference
|
||||
end
|
||||
|
||||
def respond_to_options
|
||||
respond_to do |format|
|
||||
format.html { head :ok }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue