Wesley Embry
2008-Feb-16 23:04 UTC
simple image_tag getting an erroneous parameter added to output
I have been everywhere I can think to find an answer to this problem. One of my web pages has a simple image_tag entry in a very straight-forward table. <td><img src=''<%= image_tag(granite_type.thumbnail) %>''></td> The value of this field is bordeaux_noveaux.jpg. but the result in the html is <td><img src=''<img alt="Bordeaux_noveaux" src="/images/bordeaux_noveaux.jpg?1203180811" />''></td> I have no idea where that option "?1203180811" is coming from or even what it means. I have done extensive searches on the web and read the source code for image_tag. I can''t seem to figure this out. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
gnuby
2008-Feb-17 00:50 UTC
Re: simple image_tag getting an erroneous parameter added to output
I figured it out. I didn''t need to use image_tag. The following worked fine. Didn''t need the image_url either but thought it was a little cleaner. <% image_url = granite_type.thumbnail %> <td><img src=''<%= image_url %>''></td>> <td><img src=''<%= image_tag(granite_type.thumbnail) %>''></td> > > The value of this field is bordeaux_noveaux.jpg. > > but the result in the html is > > <td><img src=''<img alt="Bordeaux_noveaux" > src="/images/bordeaux_noveaux.jpg?1203180811" />''></td> > > I have no idea where that option "?1203180811" is coming > from or even what it means. > > I have done extensive searches on the web and read > the source code for image_tag. I can''t seem to figure this > out.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jodi Showers
2008-Feb-17 01:14 UTC
Re: simple image_tag getting an erroneous parameter added to output
On 16-Feb-08, at 7:50 PM, gnuby wrote:> > I figured it out. I didn''t need to use image_tag. > The following worked fine. Didn''t need the image_url > either but thought it was a little cleaner. > > <% image_url = granite_type.thumbnail %> > <td><img src=''<%= image_url %>''></td> > >> <td><img src=''<%= image_tag(granite_type.thumbnail) %>''></td> >> >> The value of this field is bordeaux_noveaux.jpg. >> >> but the result in the html is >> >> <td><img src=''<img alt="Bordeaux_noveaux" >> src="/images/bordeaux_noveaux.jpg?1203180811" />''></td> >> >> I have no idea where that option "?1203180811" is coming >> from or even what it means. >> >> I have done extensive searches on the web and read >> the source code for image_tag. I can''t seem to figure this >> out. >did you consider <%= image_tag(granite_type.thumbnail) %> ? the params added (1204180811) are the datetime of the file encoded - to help with caching. Jodi --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
gnuby
2008-Feb-17 04:23 UTC
Re: simple image_tag getting an erroneous parameter added to output
Thank you Jodi. That was even better and now I understand everything that was happening. On Feb 16, 5:14 pm, Jodi Showers <j...-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote:> On 16-Feb-08, at 7:50 PM, gnuby wrote: > > > > > > > I figured it out. I didn''t need to use image_tag. > > The following worked fine. Didn''t need the image_url > > either but thought it was a little cleaner. > > > <% image_url = granite_type.thumbnail %> > > <td><img src=''<%= image_url %>''></td> > > >> <td><img src=''<%= image_tag(granite_type.thumbnail) %>''></td> > > >> The value of this field is bordeaux_noveaux.jpg. > > >> but the result in the html is > > >> <td><img src=''<img alt="Bordeaux_noveaux" > >> src="/images/bordeaux_noveaux.jpg?1203180811" />''></td> > > >> I have no idea where that option "?1203180811" is coming > >> from or even what it means. > > >> I have done extensive searches on the web and read > >> the source code for image_tag. I can''t seem to figure this > >> out. > > did you consider <%= image_tag(granite_type.thumbnail) %> ? > > the params added (1204180811) are the datetime of the file encoded - > to help with caching. > > Jodi--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---