Class: Location

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
ApiHandling, FriendlyId
Defined in:
app/models/location.rb

Instance Method Summary collapse

Methods included from ApiHandling

expose_api

Instance Method Details

#addressObject


24
25
26
# File 'app/models/location.rb', line 24

def address
  "#{street} #{house_number}, #{zip} #{city}"
end

#full_addressObject


20
21
22
# File 'app/models/location.rb', line 20

def full_address
  "#{address}, #{I18n.t('countries.DE')}"
end

#nice_urlObject


28
29
30
# File 'app/models/location.rb', line 28

def nice_url
  URI.parse(url).host
end