Cache the schedule page, fix empty rooms
This commit is contained in:
parent
f0ff5544c3
commit
2d79e8e692
4 changed files with 10 additions and 8 deletions
|
|
@ -53,16 +53,18 @@ class Admin::EventsController < ApplicationController
|
|||
if params.has_key? :track_id
|
||||
@event.update_attribute(:track_id, params[:track_id])
|
||||
end
|
||||
expire_page :controller => '/schedule', :action => :index
|
||||
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated")
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
expire_page :controller => '/schedule', :action => :index
|
||||
end
|
||||
|
||||
def update_state
|
||||
event = Event.find(params[:id])
|
||||
event.send(:"#{params[:transition]}!", :send_mail => params[:send_mail])
|
||||
expire_page :controller => '/schedule', :action => :index
|
||||
redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Updated state")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
class ScheduleController < ApplicationController
|
||||
|
||||
layout "application"
|
||||
|
||||
caches_page :index
|
||||
|
||||
def index
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
@events = @conference.events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue