Fix i18n translations warnings.
This commit is contained in:
@@ -19,8 +19,11 @@ class DocumentsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
@document.destroy
|
||||
flash[:notice] = t "documents.actions.destroy.notice"
|
||||
if @document.destroy
|
||||
flash[:notice] = t "documents.actions.destroy.notice"
|
||||
else
|
||||
flash[:alert] = t "documents.actions.destroy.alert"
|
||||
end
|
||||
redirect_to params[:from]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user