simplified some Active Record queries

This commit is contained in:
Hauke Klement
2015-03-11 14:31:19 +01:00
parent a06e20b6c5
commit a8bda864df
6 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ class ErrorsController < ApplicationController
before_action :set_execution_environment
def authorize!
authorize(@error || Error.where(execution_environment_id: @execution_environment.id))
authorize(@error || @execution_environment.errors)
end
private :authorize!