Sha256: 1c518f18a26f1bd8cdaa3143d82b48ed625c0a1e0ff2d2fab0caacb410c550ee
Contents?: true
Size: 668 Bytes
Versions: 12
Compression:
Stored size: 668 Bytes
Contents
class EventRevisionsController < EventCalendar::ApplicationController 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
12 entries across 12 versions & 1 rubygems