|
|
@ -95,7 +95,7 @@ module Report::Controller |
|
|
|
# RecordNotFound if the query at :id does not exist |
|
|
|
# RecordNotFound if the query at :id does not exist |
|
|
|
def destroy |
|
|
|
def destroy |
|
|
|
if @query |
|
|
|
if @query |
|
|
|
@query.destroy if allowed_to? :delete, @query |
|
|
|
@query.destroy if allowed_to? :destroy, @query |
|
|
|
else |
|
|
|
else |
|
|
|
raise ActiveRecord::RecordNotFound |
|
|
|
raise ActiveRecord::RecordNotFound |
|
|
|
end |
|
|
|
end |
|
|
|