Merge branch 'master' into refactor-messages

# Conflicts:
#	db/structure.sql
This commit is contained in:
Artur Beljajev 2018-09-01 19:39:25 +03:00
commit 056c57530c
32 changed files with 730 additions and 148 deletions

View file

@ -0,0 +1,21 @@
module Admin
module Domains
class RegistryLockController < BaseController
def destroy
set_domain
authorize! :manage, @domain
if @domain.remove_registry_lock
redirect_to edit_admin_domain_url(@domain), notice: t('.success')
else
redirect_to edit_admin_domain_url(@domain), alert: t('.error')
end
end
private
def set_domain
@domain = Domain.find(params[:domain_id])
end
end
end
end

View file

@ -47,7 +47,7 @@ module Admin
def destroy
@mail_template = MailTemplate.find(params[:id])
if @mail_template.destroy
redirect_to admin_mail_templates_path, notise: t(:deleted)
redirect_to admin_mail_templates_path, notice: t(:deleted)
else
flash.now[:alert] = I18n.t(:failure)
render 'show'