Module: HostsHelper

Defined in:
app/helpers/hosts_helper.rb

Instance Method Summary collapse

Instance Method Details

#host_name(host) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'app/helpers/hosts_helper.rb', line 2

def host_name(host)
  return nil unless host

  if host.name.nil?
    host.url
  else
    "#{host.name} (<span class=\"address\">#{host.url}</span>)".html_safe
  end
end