diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index e5906078..096a85ed 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -2,7 +2,7 @@ class ErrorsController < ApplicationController before_action :set_execution_environment def authorize! - authorize(@error || @execution_environment.errors) + authorize(@error || @errors) end private :authorize! @@ -27,8 +27,8 @@ class ErrorsController < ApplicationController private :error_params def index - authorize! @errors = Error.for_execution_environment(@execution_environment).grouped_by_message + authorize! end def set_execution_environment diff --git a/app/controllers/hints_controller.rb b/app/controllers/hints_controller.rb index 3f0acf4c..19e90e2c 100644 --- a/app/controllers/hints_controller.rb +++ b/app/controllers/hints_controller.rb @@ -28,7 +28,7 @@ class HintsController < ApplicationController private :hint_params def index - @execution_environment.hints.order(:name) + @hints = @execution_environment.hints.order(:name) authorize! end