Added csv export to registrar api_users and white_ips

This commit is contained in:
Sergei Tsoganov 2023-05-15 14:11:46 +03:00
parent 316f00cadc
commit 0f16ec77f5
11 changed files with 104 additions and 6 deletions

View file

@ -3,7 +3,7 @@ require 'net/http'
module Admin
class RegistrarsController < BaseController # rubocop:disable Metrics/ClassLength
load_and_authorize_resource
before_action :set_registrar, only: [:show, :edit, :update, :destroy]
before_action :set_registrar, only: %i[show edit update destroy]
before_action :set_registrar_status_filter, only: [:index]
helper_method :registry_vat_rate
helper_method :iban_max_length
@ -39,6 +39,11 @@ module Admin
def edit; end
def show
@result = @registrar.send(params[:records]) unless params[:records].blank?
render_by_format('admin/registrars/show', "#{@registrar.name.parameterize}_#{params[:records]}")
end
def update
if @registrar.update(registrar_params)
redirect_to [:admin, @registrar], notice: t('.updated')