Having tried a basic html page in the apps'' public folder this also
highlighted that the image does not display.
I know that the path is correct by inspecting the page using Firebug,
which displays the image!
I can then only assume that the issue is the webserver? I''ve tried
both Mongrel and WEBrick with the same effect.
This is a strange request I realise, but this application is for
educational purposes where students'' work is assessed online from the
network servers rather than uploading the work to a single web server.
Any pointers would be good! Thanks
J
On Jul 22, 11:38 pm, tICT
<teach...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> is it possible to display ''local'' images in the format
src="file:///E:/
> StudentWork/screenshots/AO1_review.png" where the source is a text
> field in a table? seems like I can generate the code ok, but the image
> won''t display....
>
> InstantRails on XP running Rails 2.0.2 and Ruby 1.8.6
>
> code for index.html.erb is ....
>
> <% for task in @tasks %>
> <tr>
> <td><img style="width:160px; height:120px;"
src="file:///<%> task.path %>" /></td>
> <td><%=h task.title %></td>
> <td><%=h task.description %></td>
> <td><%= link_to ''Show'', task
%></td>
> <td><%= link_to ''Edit'', edit_task_path(task)
%></td>
> <td><%= link_to ''Destroy'', task, :confirm
=> ''Are you
> sure?'', :method => :delete %></td>
> </tr>
> <% end %>
>
> where <%= task.path %> is the field containing the image path
>
> Cheers
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---