On Sat, Feb 27, 2016 at 9:14 PM, fugee ohu <fugee279@gmail.com> wrote:
> I'm trying to build some links from this statement <% for task in
> row_tasks %> where task.name and task.name.thumb are full path image
> file names and not having any luck
> I've been trying to link to the image from the thumb I've tried with
> helpers and basic html something like this ... <a href =
> "#{@image_path}" ><%= image_tag("#{@thumb_path}") %></a> and i've
> tried the same with link_to image_tag How am i gonna do this?
This should work I would think, given what you say above:
<% for task in row_tasks do %>
<a href="<%= image_tag(task.name)%>"><%= image_path(task.name.thumb) %></a>
<% end %>
--
Tamara Temple
tamouse@gmail.com
http://www.tamouse.org
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/m2k2lptr42.fsf%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment