Solved Issue 1259

This commit is contained in:
divyanshumehta 2017-02-11 16:45:27 +05:30
parent 42741fa90b
commit 529b8eb710
4 changed files with 21 additions and 3 deletions

View file

@ -2,7 +2,7 @@ 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
load_resource :program, through: :conference, singleton: true, except: [:index, :current]
def index
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
@ -11,6 +11,11 @@ class ConferencesController < ApplicationController
def show; end
def current
current = Conference.first
redirect_to conference_path(current.short_title)
end
private
def respond_to_options