I've put together the following query, which works as I expect it to:
stuff = @thing.children.find(
:all,
:joins => :other,
:conditions => {:others => {:another_id => some_id}},
:limit => my_limit,
:offset => my_offset,
)
However, queries of the form find(:all)
are deprecated. I have tried changing my query to the following form:
stuff = @thing.children.find(
:joins => :other,
:conditions => {:others => {:another_id => some_id}},
:limit => my_limit,
:offset => my_offset,
).all
but this throws a database error. What's the correct way to write this query?