app/controllers/application_controller.rb
##
# Build the headers required to make a rest request, specifiying content type
# and including the users token if it exists as the X-Auth-Token header.
#
Build the headers required to make a rest request, specifiying content type
and including the users token if it exists as the X-Auth-Token header.
Build the headers required to make a rest request specifiying content type and including the users token if it exists as the X - Auth - Token header .
def build_headers(token)
    headers = {'Content-Type' =>'application/json'}
    unless token.nil? 
      headers['X-Auth-Token'] = token
    end
    return headers
  end
def build_headers ( token ) headers = { 'Content-Type' => 'application/json' } unless token . nil? headers [ 'X-Auth-Token' ] = token end return headers end
Build the headers required to make a rest request, specifiying content type
and including the users token if it exists as the X-Auth-Token header.
Build the headers required to make a rest request specifiying content type and including the users token if it exists as the X - Auth - Token header .
token
<not_specific>