Class: Venue

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/venue.rb

Instance Method Summary collapse

Instance Method Details

#address_as_stringObject



16
17
18
# File 'app/models/venue.rb', line 16

def address_as_string
  street_as_string + " " + city_state_zip_as_string
end

#address_as_url_queryObject



30
31
32
# File 'app/models/venue.rb', line 30

def address_as_url_query
  URI::escape(street_as_string + " " + city_state_zip_as_string)
end

#city_state_zip_as_stringObject



25
26
27
28
# File 'app/models/venue.rb', line 25

def city_state_zip_as_string
  str = (city || "") + " " + (state || "") + " " + (zip || "")
  str.strip
end

#full_street_addressObject



34
35
36
37
# File 'app/models/venue.rb', line 34

def full_street_address
  (address1 || "") + ", " + (address2 || "") + ", " + (city || "") +
    ", " + (state || "") + " " + (zip || "")
end

#refresh_show_statsObject



39
40
41
42
43
# File 'app/models/venue.rb', line 39

def refresh_show_stats
  unless self.event.nil?
    self.event.shows.each {|s| s.delay.refresh_stats }
  end
end

#street_as_stringObject



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

def street_as_string
  str = (address1 || "") + " " + (address2 || "")
  str.strip
end