Ja Bo :
The following code from the view worked in Rails 1.1.6
<%= image_tag(url_for(:action => 'picture', :id => article.picture_id),
:size => "110x", :alt => article.picture.label) %>Now it does not work anymore (under Rails 1.2.1) : What is wrong ??
HTML code generated :
1.1.6
<img alt="Alt label" src="/article/picture/3.png?" width="110" />
1.2.1
<img alt="Alt label" src="/news/picture/3.png" />There seems to be a difference, what to do ??
Hi,
Suppose the image height is 50 px.
You can write :
<%= image_tag(url_for(:action => 'picture', :id => article.picture_id),
:size => "110x50", :alt => article.picture.label) %>
or :
<%= image_tag(url_for(:action => 'picture', :id => article.picture_id),
:width => "110", :height => '50', :alt => article.picture.label) %>
-- Jean-François.