It's "conditions", not "condition":

Campsite.find(:all, :conditions => ['walk_id = ?',params[:walks][:id]])

On Wed, Oct 8, 2008 at 10:01 PM, Jay Pangmi
<[EMAIL PROTECTED]> wrote:
>
> I'm trying to use Campsite.find(:all, :condition => ['walk_id =
> ?',params[:walks][:id]]) but fails and instead, if I use
> Campsite.find_by_sql("select * from campsites where walk_id =
> "+params[:walks][:id]), it works fine. So, I'm wondering why..
> I've created combo box as:
> <%form_tag do%>
>  <%=select :walks, :id, @great_walks%>
> <%end%>
>
> thanks.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>



-- 
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to