Syntax Error in find()

Maybe I misunderstand the parameterization of find(), I am getting this
syntax error for
<% @choices = Choic
e.find(:all, :conditions => “question_id” = question.id, :order =>
“order”) %>

---- ERROR LOG ----

ActionView::TemplateError (compile error
…/config/…/app/views/admin/test/show.rhtml:37: syntax error
_erbout.concat " "; @choices = Choice.find(:all, :conditions =>
“question_id” = question.id, :order => “order”) ; _erbout.concat “\r\n”
^
…/config/…/app/views/admin/test/show.rhtml:37: syntax error
_erbout.concat " "; @choices = Choice.find(:all, :conditions =>
“question_id” = question.id, :order => “order”) ; _erbout.concat “\r\n”
^
…/config/…/app/views/admin/test/show.rhtml:37: syntax error
_erbout.concat " "; @choices = Choice.find(:all, :conditions =>
“question_id” = question.id, :order => “order”) ; _erbout.concat “\r\n”
^)
on line #37 of app/views/admin/test/show.rhtml:
34:


35: <%= link_to question.question, :controller => “question”,
:action => “show”, :id => question.id %>
36:
37: <% @choices = Choice.find(:all, :conditions => “question_id” =
question.id, :order => “order”) %>
38: <% @choices.each do |choice| %>
39:
40: <%= link_to choice.choice, :controller => “choice”,
:action => “show”, :id => choice.id %>

On 4/4/06, Arch S. [email protected] wrote:

Maybe I misunderstand the parameterization of find(), I am getting this
syntax error for
<% @choices = Choic
e.find(:all, :conditions => “question_id” = question.id, :order =>
“order”) %>

It looks like your conditions are messed up.

:conditions => [“question_id = ?”, question.id]

– James

James L. wrote:

On 4/4/06, Arch S. [email protected] wrote:

Maybe I misunderstand the parameterization of find(), I am getting this
syntax error for
<% @choices = Choic
e.find(:all, :conditions => “question_id” = question.id, :order =>
“order”) %>

It looks like your conditions are messed up.

:conditions => [“question_id = ?”, question.id]

– James

Ahh I get it thanks!