Class: Venue
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Venue
- Defined in:
- app/models/venue.rb
Instance Method Summary collapse
- #address_as_string ⇒ Object
- #address_as_url_query ⇒ Object
- #city_state_zip_as_string ⇒ Object
- #full_street_address ⇒ Object
- #refresh_show_stats ⇒ Object
- #street_as_string ⇒ Object
Instance Method Details
#address_as_string ⇒ Object
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_query ⇒ Object
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_string ⇒ Object
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_address ⇒ Object
34 35 36 37 |
# File 'app/models/venue.rb', line 34 def full_street_address (address1 || "") + ", " + (address2 || "") + ", " + (city || "") + ", " + (state || "") + " " + (zip || "") end |
#refresh_show_stats ⇒ Object
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_string ⇒ Object
20 21 22 23 |
# File 'app/models/venue.rb', line 20 def street_as_string str = (address1 || "") + " " + (address2 || "") str.strip end |