On 4 Dec 2008, at 13:53, Dave Smith wrote:

>
> Frederick Cheung wrote:
>> On 4 Dec 2008, at 13:36, Dave Smith wrote:
>>
>>>>> "/article_images/0000/0047/Photo_59.jpg":String
>>>>> Extracted source (around line #12):
>>>>>
>>>> What's the rest of that stack trace?
>>>>
>>>> Fred
>>>
>> looks like you're passing that string to link_to twice.
>>
>> Fred
>
> ummm interesting...
>
> module Admin::ArticlesHelper
>  def article_image_for(article)
>    if article.article_image
>      article_img = article.article_image.public_filename
>    #  link_to image_tag(article_img),
> article.article_image.public_filename
>
>      link_to 'click me', article_img,
> article.article_image.public_filename

Well you are.
Just
      link_to 'click me', article_img

is quite enough.

Fred

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to