mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Merge branch 'master' into refactor-messages
# Conflicts: # db/structure.sql
This commit is contained in:
commit
aff5b68a2f
29 changed files with 297 additions and 93 deletions
|
@ -1,7 +1,7 @@
|
|||
module Admin
|
||||
class DomainsController < BaseController
|
||||
load_and_authorize_resource
|
||||
before_action :set_domain, only: [:show, :edit, :update, :zonefile]
|
||||
before_action :set_domain, only: %i[show edit update keep]
|
||||
authorize_resource
|
||||
helper_method :force_delete_templates
|
||||
|
||||
def index
|
||||
|
@ -33,7 +33,8 @@ module Admin
|
|||
end
|
||||
|
||||
def show
|
||||
@domain.valid?
|
||||
# Validation is needed to warn users
|
||||
@domain.validate
|
||||
end
|
||||
|
||||
def edit
|
||||
|
@ -60,6 +61,11 @@ module Admin
|
|||
@versions = @domain.versions
|
||||
end
|
||||
|
||||
def keep
|
||||
@domain.keep
|
||||
redirect_to edit_admin_domain_url(@domain), notice: t('.kept')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue