def link_to_image(image_number, caption)
   link_to("image ##{image_number}", "images/image- 
#{image_number}", :rel => 'lightbox', :title => caption)
end

 >> puts link_to_image(3, 'third image')
<a href="images/image-3" rel="lightbox" title="third image">image #3</a>


On Feb 17, 2009, at 8:24 PM, Newb Newb wrote:

>
> hi..
> this is html generated code.
> <a href="images/image-1.jpg" rel="lightbox" title="my caption">image
> #1</a>
>
> is it possible to use Rails code instead of the above one.
> if possible to use Rails helper means which would generate html code
> like above
> -- 
> Posted via http://www.ruby-forum.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 [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