Image Tags

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 %>

<%=h task.title %> <%=h task.description %> <%= link_to 'Show', task %> <%= link_to 'Edit', edit_task_path(task) %> <%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %> <% end %>

where <%= task.path %> is the field containing the image path

Cheers

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs