diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 032d926..4a87bd1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,7 +12,6 @@ class ApplicationController < ActionController::Base #layout Proc.new { |controller| controller.request.host } layout 'public/application' - def self.default_url_options(options={}) if I18n.locale != I18n.default_locale options.merge({locale: I18n.locale}) diff --git a/app/controllers/public/application_controller.rb b/app/controllers/public/application_controller.rb index a1958df..47e7e3f 100644 --- a/app/controllers/public/application_controller.rb +++ b/app/controllers/public/application_controller.rb @@ -2,5 +2,9 @@ module Public class ApplicationController < ::ApplicationController include ::CurrentConferenceAssigning before_filter :require_current_conference! + + def current_conference + @current_conference ||= Conference.order(created_at: :desc).find_by(host_name: request.host) + end end end diff --git a/config/routes.rb b/config/routes.rb index e98b747..4e6d5b1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,7 @@ Rails.application.routes.draw do devise_for :users - scope module: :public, constraints: {subdomain: 'cfp'}, conference_id: 1 do + scope module: :public do root to: 'home#index' resource :personal_profile, path: 'profile' resources :events