Sha256: 891eb6e540e23eca8b5ed2cb6b05e2d9434802cda12d8809ef49746aaa783282
Contents?: true
Size: 704 Bytes
Versions: 1
Compression:
Stored size: 704 Bytes
Contents
class EventRevisionsController < EventCalendar::ApplicationController helper EventCalendar::EventsHelper def index if params[:id] redirect_to(event_revision_path(params[:id])) else @deleted_events = EventRevision.deleted end end def show @event_revision = EventRevision.find params[:id] end def restore @event_revision = EventRevision.find(params[:id]) if @event_revision.restore flash[:notice] = "Event <em>#{@event_revision.name}</em> restored.".html_safe redirect_to(event_path(@event_revision)) else flash[:error] = "There was an error restoring the event." redirect_to(event_revisions_path) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
event_calendar_engine-0.2.8 | app/controllers/event_revisions_controller.rb |