Slide 70
Slide 70 text
class Event
include ActiveModel::Model
define_attribute_methods :venue_name, :venue_street,
:venue_city, :venue_state,
:venue_zip_code, :venue_country
validates :venue_name,
:presence => true
validates :venue_city,
:presence => {
:if => :venue_partially_set? }
# Lots more lines of validations...
def address_in_one_line_format; # Code here; end
def address_in_multiline_text_format; # Code here; end
def address_in_html_format; # Code here; end
end