2014-08-06 21:14:00 +03:00
|
|
|
module Admin
|
|
|
|
|
class TracksController < ApplicationController
|
|
|
|
|
before_filter :verify_organizer
|
2013-01-07 09:04:09 +01:00
|
|
|
|
2014-08-06 21:14:00 +03:00
|
|
|
def show
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html { render :tracks_list }
|
|
|
|
|
format.json { render json: @conference.tracks.to_json }
|
|
|
|
|
end
|
2013-01-11 15:00:54 +01:00
|
|
|
end
|
2013-01-07 09:04:09 +01:00
|
|
|
|
2014-08-06 21:14:00 +03:00
|
|
|
def update
|
|
|
|
|
if @conference.update_attributes(params[:conference])
|
|
|
|
|
redirect_to(admin_conference_tracks_path(
|
|
|
|
|
conference_id: @conference.short_title),
|
|
|
|
|
notice: 'Tracks were successfully updated.')
|
|
|
|
|
else
|
|
|
|
|
redirect_to(admin_conference_tracks_path(
|
|
|
|
|
conference_id: @conference.short_title),
|
|
|
|
|
notice: 'Tracks update failed.')
|
|
|
|
|
end
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|