Class: AutoError::AppErrorsController
Instance Method Summary
collapse
#auto_error_js_namespace, #auto_error_void_path
Instance Method Details
#destroy ⇒ Object
9
10
11
12
13
14
|
# File 'app/controllers/auto_error/app_errors_controller.rb', line 9
def destroy
@error = AutoError::AppError.find( params[:id] )
@error.resolved_at = Time.now
@error.save
render json: { ok: true }
end
|
#index ⇒ Object
4
5
6
7
|
# File 'app/controllers/auto_error/app_errors_controller.rb', line 4
def index
@errors = AutoError::AppError.unresolved
render json: @errors.map { |ae| AutoError::AppErrorDecorator.new(ae).as_json( @h ) }
end
|