Skip to content

Commit

Permalink
Merge pull request #1115 from internetee/fix-link
Browse files Browse the repository at this point in the history
Do not generate a link for `RegistrantUser`
  • Loading branch information
vohmar authored Mar 21, 2019
2 parents 7756d4f + 03ae863 commit 0772274
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ def updator_link(model)
return 'unknown' if model.updator.blank?
return model.updator if model.updator.is_a? String

# can be api user or some other user
link_to(model.updator, ['admin', model.updator])
if model.updator.kind_of?(RegistrantUser)
model.updator
else
link_to(model.updator, ['admin', model.updator])
end
end

def currency(amount)
Expand Down

0 comments on commit 0772274

Please sign in to comment.