 |
Forums |
Admin Start New Thread
By: ff bevier
RE: p. 45: the image tag [ reply ] 2008-04-24 09:09
|
PS:
as the phpmyadmin screenshot shows I just entered "png"
=> you mean p. 32?
and is 'png' the file suffix of your image? But, honestly, i tried 'xxx' as file suffix and still, it worked
If I save the path as a varchar in the database there is no problem.
=> but then you have to store the image elsewhere, isn't it?
so please (again) - how about your database( structure/content/version)?
|
By: ff bevier
RE: p. 45: the image tag [ reply ] 2008-04-24 08:51
|
sorry to be a little late
1. the line
<%= image_tag( url_for( :action => "image", :id => @hello.id ), :alt =>
"Bild" ) %>
only works with "hello.id" instead of "@hello.id"
=> right - misspelling. If you look at the source code (s. image below) you see, that actually it is 'hello'
for hello in @hellos...
2. I can't see the image, just the alt message. Did I forget to configure sth. to display images?!
==> you have to configure forms, but in 'index' no form is used, so can you please check your database, file "hellos"?
|
By: Micha Pietsch
RE: p. 45: the image tag [ reply ] 2008-03-31 12:56
|
the html sais: src="/hellos/image/1"
which calls the "image" function for id=1?
as the phpmyadmin screenshot shows I just entered "png" (screenshot: "jpeg") as content_type, not the mime type.
If I save the path as a varchar in the database there is no problem.
|
By: Kaan Karaca
RE: p. 45: the image tag [ reply ] 2008-03-31 11:45
|
Hi Micha,
thank you for the hint. We'll check the issue you mentioned first.
Regarding your second question:
Could you check the src-Attribute location and whether the image itself is requestable. You could watch your logfile if there are any thrown exceptions.
I hope this helps you furhter, otherwise just drop us a message in this thread.
Cheers
derKaan
|
By: Micha Pietsch
p. 45: the image tag [ reply ] 2008-03-30 19:15
|
First thanks for your work, great book!
1.
the line
<%= image_tag( url_for( :action => "image", :id => @hello.id ), :alt =>
"Bild" ) %>
only works with "hello.id" instead of "@hello.id".
2.
I can't see the image, just the alt message. Did I forget to configure sth. to display images?!
|
|
 |