[Rails] Re: Keep getting syntax error
Frederick Cheung wrote:
> On Jan 12, 3:15 pm, John Merlino <li...@ruby-forum.com> wrote:
>> Frederick Cheung wrote:
>
>> After I change it to:
>>
>> named_scope :filtertabs, :join => :student_state, lambda { |*args|
>> {:conditions => {'student_state.id' => args}} }
>>
>> I still get a syntax error.
>
> Your lambda should return a single hash with all the query options you
> want. (and its :joins not :join)
>
> Fred
Isn't it returning a single hash here?
@student_state = StudentState.find(params[:id])
--
Posted via http://www.ruby-forum.com/.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home