mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +02:00
Added creator_link and updator_link helpers
This commit is contained in:
parent
15272bad76
commit
d8d951974e
3 changed files with 24 additions and 7 deletions
|
@ -17,4 +17,20 @@ module ApplicationHelper
|
|||
"#{contact.ident} [#{contact.ident_country_code} #{contact.ident_type}]"
|
||||
end
|
||||
end
|
||||
|
||||
def creator_link(model)
|
||||
return 'not present' if model.blank?
|
||||
return model if model.kind_of? String
|
||||
|
||||
# can be api user or some other user
|
||||
link_to(model.creator, ['admin', model.creator])
|
||||
end
|
||||
|
||||
def updator_link(model)
|
||||
return 'not present' if model.blank?
|
||||
return model if model.kind_of? String
|
||||
|
||||
# can be api user or some other user
|
||||
link_to(model.creator, ['admin', model.updator])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue