mirror of
https://github.com/internetee/registry.git
synced 2025-08-25 18:43:36 +02:00
Refactor admin/contact_version
and admin/domain_version
csv generation logic
This commit is contained in:
parent
807419bc3a
commit
9fb4a6d7e6
19 changed files with 117 additions and 156 deletions
|
@ -9,30 +9,6 @@ module ApplicationHelper
|
|||
"background-image: url(#{image_path("#{unstable_env}.png")});"
|
||||
end
|
||||
|
||||
def ident_for(contact)
|
||||
if contact.is_a? Hash
|
||||
ident_country_code = contact[:ident_country_code]
|
||||
ident_type = contact[:ident_type]
|
||||
ident = contact[:ident]
|
||||
else
|
||||
ident_country_code = contact.ident_country_code
|
||||
ident_type = contact.ident_type
|
||||
ident = contact.ident
|
||||
end
|
||||
|
||||
case ident_type
|
||||
when 'birthday'
|
||||
"#{ident} [#{ident_country_code} #{ident_type}]"
|
||||
else
|
||||
if ident.present?
|
||||
"#{ident} [#{ident_country_code} #{ident_type}]"
|
||||
else
|
||||
"[#{ident_country_code} #{ident_type}]"
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
def current_commit_link
|
||||
hash = `git rev-parse --short HEAD`
|
||||
current_repo = `git remote get-url origin`.gsub('com:', 'com/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue