Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Changing styles is my guess; less a reliance on auto-generated magic. There is nothing wrong with this:

    find_all_by_user_id_and_conversation_id(params[:user_id], @conversation.id)
But this is equally (actually more) concise:

    where(user_id: params[:user_id], conversation_id: @conversation.id)
...and it builds on the composable scope system (derived from ARel).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: