Re: using params in a comparison

Ryan Bigg (Radar)
Wed, 28 May 2008 01:29:36 -0000

Obviously photo.other  does not equal params[:id]

What is .other?

On Wed, May 28, 2008 at 10:34 AM, Dave Lynam
<dlynam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
> 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.
> >
>


--
Appreciated my help?
Recommend me on Working With Rails