Topic: Rails 3 active record syntax change question

Hi, 

Anyone know if the 2 lines of code below are equivalent?  The second line is a change I made for Rails 3 but its not working.

@chapters_by_book = Chapter.find_all_by_book_id(params[:book_id])

@chapters_by_book = Chapter.where(params[:book_id])

Last edited by dcastellano1 (2010-12-11 11:37:43)

Re: Rails 3 active record syntax change question

@chapters_by_book = Chapter.where(:book_id => params[:book_id])

Re: Rails 3 active record syntax change question

Thanks!