Class: Eras::ErrorsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Eras::ErrorsController
- Defined in:
- app/controllers/eras/errors_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/eras/errors_controller.rb', line 14 def destroy # TODO: rename to be adapter agnostic Eras.adapter.destroy_file redirect_to :root end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/eras/errors_controller.rb', line 6 def index @errors = Eras.adapter.read_errors.filter { |e| e['context']['rails_env'] == @environment } end |
#set_environment ⇒ Object
20 21 22 |
# File 'app/controllers/eras/errors_controller.rb', line 20 def set_environment @environment = params[:environment] || 'development' end |