module AuthAssistant::Helpers::LocalHost

Public Instance Methods

localhost?() click to toggle source
# File lib/auth_assistant/helpers/localhost.rb, line 12
def localhost?
   ['localhost', '127.0.0.1'].include?(request.host)
end
localhost_block(&block) click to toggle source
# File lib/auth_assistant/helpers/localhost.rb, line 4
def localhost_block(&block)
  with_output_buffer(&block) if localhost?      
end
not_localhost_block(&block) click to toggle source
# File lib/auth_assistant/helpers/localhost.rb, line 8
def not_localhost_block(&block)
  with_output_buffer(&block) if !localhost?
end

Public Class Methods

included(base) click to toggle source
# File lib/auth_assistant/helpers/localhost.rb, line 16
def self.included(base)
  base.helper_method :localhost_block, :not_localhost_block, :localhost?      
end