using params in a comparison

Dave Lynam
Wed, 28 May 2008 01:04:05 -0000

Hi, i will keep this short:

<% for photo in @photos -%>
    <% if photo.other == params[:id] %>
        <%= link_to image_tag(photo.public_filename(:thumb)) %>
    <% end %>
<% end %>

This is the code Im using and it is not displaying anything.  All the
values are stored correctly and params[:id] has the correct value.  I
think there is something wrong in the comparison: if photo.other =params[:id].
Can you use the params hash to make comparisons like
this?

thanks.