Sha256: f02ddd9296482fa9ccecbf57393c71cc07e7588c99aa757cd702802f09483b8f

Contents?: true

Size: 415 Bytes

Versions: 2

Compression:

Stored size: 415 Bytes

Contents

class AutoError::AppErrorsController < AutoError::ApplicationController
  before_filter :ensure_authenticated

  def index
    @errors = AutoError::AppError.unresolved
    render json: @errors.map { |ae| AutoError::AppErrorDecorator.new(ae).as_json }
  end

  def destroy
    @error = AutoError::AppError.find( params[:id] )
    @error.resolved_at = Time.now
    @error.save
    render json: { ok: true }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
auto_error-0.0.3 app/controllers/auto_error/app_errors_controller.rb
auto_error-0.0.2 app/controllers/auto_error/app_errors_controller.rb