Get rid of the home controller

This commit is contained in:
Henne Vogelsang 2014-11-14 17:24:24 +01:00
parent a41f76cca1
commit e65ca7fb58
11 changed files with 64 additions and 56 deletions

View file

@ -1,6 +1,12 @@
class ConferenceController < ApplicationController
before_filter :respond_to_options
load_and_authorize_resource find_by: :short_title
def index
@current = Conference.where('end_date >= ?', Date.current).order('start_date ASC')
@antiquated = @conferences - @current
end
def show
@keynote_speakers = @conference.keynote_speakers
end
@ -9,4 +15,12 @@ class ConferenceController < ApplicationController
@photos = @conference.photos
render 'photos', formats: [:js]
end
private
def respond_to_options
respond_to do |format|
format.html { head :ok }
end if request.options?
end
end