|
@ -6,16 +6,18 @@ class ConferencesController < ApplicationController |
|
|
|
|
|
|
|
|
# GET /conferences |
|
|
# GET /conferences |
|
|
def index |
|
|
def index |
|
|
#Conference.all.each {|m| m.poster.recreate_versions!} |
|
|
#puts params |
|
|
puts " ------------- CONFERENCE INDEX -------------- " |
|
|
@conference_type = nil |
|
|
puts params |
|
|
if params['conference_type'] |
|
|
@conferences = Conference.all |
|
|
@conference_type = ConferenceType.find_by!(:slug => params['conference_type']) |
|
|
|
|
|
@conferences = Conference.where(:conference_type_id => @conference_type.id) |
|
|
|
|
|
else |
|
|
|
|
|
@conferences = Conference.all |
|
|
|
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
# GET /conferences/1 |
|
|
# GET /conferences/1 |
|
|
def show |
|
|
def show |
|
|
puts " --------------------------- " |
|
|
|
|
|
puts params[:slug] |
|
|
|
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
# GET /conferences/new |
|
|
# GET /conferences/new |
|
@ -177,8 +179,6 @@ class ConferencesController < ApplicationController |
|
|
# Use callbacks to share common setup or constraints between actions. |
|
|
# Use callbacks to share common setup or constraints between actions. |
|
|
def set_conference |
|
|
def set_conference |
|
|
@conference = nil |
|
|
@conference = nil |
|
|
puts ' ---------------------- ' |
|
|
|
|
|
puts params |
|
|
|
|
|
if type = ConferenceType.find_by!(slug: params[:conference_type] || params[:conference_type_slug] || 'bikebike') |
|
|
if type = ConferenceType.find_by!(slug: params[:conference_type] || params[:conference_type_slug] || 'bikebike') |
|
|
if @conference = Conference.find_by!(slug: params[:conference_slug] || params[:slug], conference_type_id: type.id) |
|
|
if @conference = Conference.find_by!(slug: params[:conference_slug] || params[:slug], conference_type_id: type.id) |
|
|
set_conference_registration |
|
|
set_conference_registration |
|
|