Image_tag size question


#1

Hi all,
This used to work in Rails 1.1:
<%= image_tag(‘blue.jpg’, :size => “#{count / total * max_length}x9”) %>
However now in 1.2 it seems broken. This expression yield an unresize
1x1 blue pixel.
What am I doing wrong? All the variables used exist…

Harm


#2

Harm Aa wrote:

Hi all,
This used to work in Rails 1.1:
<%= image_tag(‘blue.jpg’, :size => “#{count / total * max_length}x9”) %>
However now in 1.2 it seems broken. This expression yield an unresize
1x1 blue pixel.
What am I doing wrong? All the variables used exist…

Harm

As tradition dictates, it suddenly hit me. Count and total where
integers… And got rounded down to zero… Right, fixed it. Thanks you
all for your attention, I’m going to be embarrassed now.

Harm