mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Add zonefile generation procedure
This commit is contained in:
parent
f5ce88b548
commit
ac4b63f390
23 changed files with 370 additions and 255 deletions
30
app/controllers/admin/zonefile_settings_controller.rb
Normal file
30
app/controllers/admin/zonefile_settings_controller.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
class Admin::ZonefileSettingsController < ApplicationController
|
||||
before_action :set_zonefile_setting, only: [:update, :edit]
|
||||
def index
|
||||
@zonefile_settings = ZonefileSetting.all
|
||||
end
|
||||
|
||||
def edit
|
||||
@zonefile_setting = ZonefileSetting.find(params[:id])
|
||||
end
|
||||
|
||||
def update
|
||||
if @zonefile_setting.update(zonefile_setting_params)
|
||||
flash[:notice] = I18n.t('shared.record_updated')
|
||||
redirect_to admin_zonefile_settings_path
|
||||
else
|
||||
flash.now[:alert] = I18n.t('shared.failed_to_update_record')
|
||||
render 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_zonefile_setting
|
||||
@zonefile_setting = ZonefileSetting.find(params[:id])
|
||||
end
|
||||
|
||||
def zonefile_setting_params
|
||||
params.require(:zonefile_setting).permit(:ttl, :refresh, :retry, :expire, :minimum_ttl, :email)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue