Sha256: d4a1c5e73ebf3e834872a9553ccd94e038d5e0b9cdd913b72c6fefc308171232

Contents?: true

Size: 664 Bytes

Versions: 8

Compression:

Stored size: 664 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

8 entries across 8 versions & 1 rubygems

Version Path
event_calendar_engine-0.2.7 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.6 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.5 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.4 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.3 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.2 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.1 app/controllers/event_revisions_controller.rb
event_calendar_engine-0.2.0 app/controllers/event_revisions_controller.rb