helper:

def print_address(address)
  print address.address1
  puts "<br/>"
  unless @address.address2.blank?
    print address.address2
    puts "<br/>"
  end
  puts "#{address.city}, #{address.state} #{address.zip_code}"
end

Thar ya go.

-hampton.

PS: That's totally untested code that I have just written now at 8:30
in the morning without any coffee.

On 11/2/07, Steve <[EMAIL PROTECTED]> wrote:
>
> Could this be written differently so that it would format better in the
> actual source that is rendered?
>
> %span
>   = @address.address1
>   %br
>   = @address.address2.blank? ? '' : "[EMAIL PROTECTED]<br />"
>   = "[EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED]"
>
> I'm wanting it to look something like this:
>
> 123 Main St.<br />
> PO Box 123<br />
> Anytown, AZ 12345
>
> The reason being is that it's requiring me to write some ugly matching
> code for my tests.
>
> Thanks,
> Steve
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to