Use New Install within their own template

It used to be a partial inside #index, but having their own page
yields some extra benefits:

- Performance: Move logic from the view to the controller
  - Theres' no need to go extra steps inside the :index view
- UI: Remove the extra 'Upcoming Conferences' when the system needs
  to start the flow of the creation of the first user
This commit is contained in:
Espartaco Palma 2019-07-18 02:24:25 -07:00 committed by Henne Vogelsang
parent ab0ff0ff03
commit e7452a9d31
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0
3 changed files with 4 additions and 3 deletions

View file

@ -8,6 +8,9 @@ class ConferencesController < ApplicationController
def index
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
@antiquated = Conference.where('end_date < ?', Date.current)
if @antiquated.empty? && @current.empty? && User.empty?
render :new_install
end
end
def show