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

Version Path
event_calendar_engine-0.1.11 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.10 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.9 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.8 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.7 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.6 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.5 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.4 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.3 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.2 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.1 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.1.0 app/controllers/event_revisions_controller.rb