app/models/address.rb
def to_html
    if address_2.blank?
      "<div>#{address_1.strip}</div><div>#{city}, #{state} #{zip}</div>".html_safe
    else
      "<div>#{address_1.strip}</div><div>#{address_2}</div><div>#{city}, #{state} #{zip}</div>".html_safe
    end
  end
# Get the full address formatted as a string with each line enclosed within html <div> tags
#
# @example Get the full address as a <div> delimited string
#   model.to_html
#
# @return [ String ] the full address
Get the full address formatted as a string with each line enclosed within html  tags
Get the full address formatted as a string with each line enclosed within html tags
def to_html
    if address_2.blank?
      "<div>#{address_1.strip}</div><div>#{city}, #{state} #{zip}</div>".html_safe
    else
      "<div>#{address_1.strip}</div><div>#{address_2}</div><div>#{city}, #{state} #{zip}</div>".html_safe
    end
  end
def to_html if address_2 . blank? "<div>#{address_1.strip}</div><div>#{city}, #{state} #{zip}</div>" . html_safe else "<div>#{address_1.strip}</div><div>#{address_2}</div><div>#{city}, #{state} #{zip}</div>" . html_safe end end
Get the full address formatted as a string with each line enclosed within html <div> tags
Get the full address formatted as a string with each line enclosed within html <div > tags
the full address
the full address
 String 
example
Get the full address as a  delimited string model.to_html
Get the full address as a delimited string model . to_html