style fixes

This commit is contained in:
Stella Rouzi 2014-08-12 20:23:51 +03:00
parent eaf637e9bd
commit f7ef401be7
9 changed files with 29 additions and 54 deletions

View file

@ -57,7 +57,6 @@ module Admin
# DELETE questions/1
def destroy
if can? :destroy, @question
# Do not delete global questions
if @question.global == false
@ -71,7 +70,7 @@ module Admin
a.delete
end
flash[:notice] = "Deleted question: #{@question.title} and its answers: #{@question.answers.map {|a| a.title}.join ','}"
end
end
rescue ActiveRecord::RecordInvalid
flash[:error] = "Could not delete question."
end