mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
c6a93a3acd
8 changed files with 67 additions and 12 deletions
|
@ -15,6 +15,8 @@ class Admin::DomainsController < AdminController
|
|||
end
|
||||
|
||||
def update
|
||||
add_prefix_to_statuses
|
||||
|
||||
if @domain.update(domain_params)
|
||||
flash[:notice] = I18n.t('shared.domain_updated')
|
||||
redirect_to [:admin, @domain]
|
||||
|
@ -36,4 +38,10 @@ class Admin::DomainsController < AdminController
|
|||
domain_statuses_attributes: [:id, :value, :description, :_destroy]
|
||||
)
|
||||
end
|
||||
|
||||
def add_prefix_to_statuses
|
||||
domain_params[:domain_statuses_attributes].each do |_k, hash|
|
||||
hash[:value] = hash[:value].prepend('server')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue