- This is a very basic support. All it affects is the listings on the homepage. Every conference can set a domain, and as long as the request host matches this domain, the conference will be shown on the list - If a conference does not have a domain set (which will be the case for older conferences), such conferences are shown always - Conference creation and edits now have an optional domain field - Also adds corresponding migrations (+index)
22 lines
557 B
Ruby
22 lines
557 B
Ruby
class ConferencesController < ApplicationController
|
|
protect_from_forgery with: :null_session
|
|
before_action :respond_to_options
|
|
load_and_authorize_resource find_by: :short_title
|
|
load_resource :program, through: :conference, singleton: true, except: :index
|
|
|
|
def index
|
|
domain = request.host
|
|
@current = Conference.get_conferences_to_list domain
|
|
@antiquated = @conferences - @current
|
|
end
|
|
|
|
def show; end
|
|
|
|
private
|
|
|
|
def respond_to_options
|
|
respond_to do |format|
|
|
format.html { head :ok }
|
|
end if request.options?
|
|
end
|
|
end
|