Fixed codeclimate issues

This commit is contained in:
Sergei Tsoganov 2023-05-15 14:23:41 +03:00
parent 0f16ec77f5
commit dc41cfb103
3 changed files with 11 additions and 10 deletions

View file

@ -40,8 +40,9 @@ 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]}")
method = params[:records].present? ? params[:records] : 'api_users'
@result = @registrar.send(method)
render_by_format('admin/registrars/show', "#{@registrar.name.parameterize}_#{method}")
end
def update