On Jan 8, 2010, at 11:52 AM, Pale Horse wrote:

Pale Horse wrote:
<%= link_to (scale_image_tag testimonial.picture1, :alt => "dyjdcgyhjk",
:title => "dxtykdyj", :height => 110, :width => 110, :border => "0"),
{:action => "show", :id => testimonial} %>

What am I doing wrong with ':alt => "dyjdcgyhjk", :title => "dxtykdyj"' to make it not work? I've looked in the source code and both are empty
:(

Apologies, I've realised the problem :)

<%= link_to (scale_image_tag testimonial.picture1, :height => 110,
:width => 110, :border => "0"), {:action => "show", :id => testimonial},
:title => testimonial.quote %>
--

<%= link_to scale_image_tag(testimonial.picture1, :height => 110,
                            :width => 110, :border => "0"),
            {:action => "show", :id => testimonial},
            :title => testimonial.quote %>

Without adding more parentheses, I just wanted to suggest (to you and anyone else reading) that you actually use parentheses to surround the method arguments to scale_image_tag rather than use them to group the arguments. If the space after 'link_to' was removed, the entire parenthetical group would result in a syntax error.

Omitting parentheses can be a nice thing, but when you need them, you really need to put them in the right place.

I'd also recommend surrounding the arguments to link_to with their own set of parentheses.

-Rob

Rob Biedenharn          http://agileconsultingllc.com
r...@agileconsultingllc.com



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to