Module: CanTango::Permit::Helper::Host

Defined in:
lib/cantango/permit/helper/host.rb

Instance Method Summary collapse

Instance Method Details

#local_host?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/cantango/permit/helper/host.rb', line 4

def local_host?
  CanTango.config.localhosts.registered.include? request.host
end

#public_host?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/cantango/permit/helper/host.rb', line 8

def public_host?
  !local_host?
end