Sha256: a62284057c8645b054a05493aa17e244d9826b068ac9680626641f700d20991e
Contents?: true
Size: 495 Bytes
Versions: 1
Compression:
Stored size: 495 Bytes
Contents
module Calagator class AdminController < ApplicationController require_admin def index end def events @events = Event.future end def lock_event @event = Event.find(params[:event_id]) if @event.locked? @event.unlock_editing! flash[:success] = "Unlocked event #{@event.title} (#{@event.id})" else @event.lock_editing! flash[:success] = "Locked event #{@event.title} (#{@event.id})" end redirect_to :action => :events end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
calagator-0.0.1.pre1 | app/controllers/calagator/admin_controller.rb |