Class: Adviser

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Geocodable
Defined in:
app/models/adviser.rb

Instance Method Summary collapse

Methods included from Geocodable

#geocode!, included, #latitude=, #longitude=

Instance Method Details

#coordinatesObject



44
45
46
# File 'app/models/adviser.rb', line 44

def coordinates
  [latitude, longitude]
end

#field_orderObject



48
49
50
51
52
53
54
55
# File 'app/models/adviser.rb', line 48

def field_order
  [
    :reference_number,
    :postcode,
    :travel_distance,
    :confirmed_disclaimer
  ]
end

#full_street_addressObject



36
37
38
# File 'app/models/adviser.rb', line 36

def full_street_address
  "#{postcode}, United Kingdom"
end

#geocoded?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'app/models/adviser.rb', line 40

def geocoded?
  coordinates.compact.present?
end