Accessing scopes

If with_scope has been called previously, how do I access the find
conditions dynamically?

I am asking because I am using a find_by_sql call (which clobbers the
with_scope). How can I access the method scoping so that I can read it
and incorporate it into my query manually?

Bob Firth wrote:

If with_scope has been called previously, how do I access the find
conditions dynamically?

I am asking because I am using a find_by_sql call (which clobbers the
with_scope). How can I access the method scoping so that I can read it
and incorporate it into my query manually?

any answers to this. I’m finding myself in the same position. I’m
using the will_paginate plugin and I have a couple of find_by_sql calls
that I’d love to somehow get at the limit and offset and just modify my
sql to include those parameters…

El Gato wrote:

Bob Firth wrote:

If with_scope has been called previously, how do I access the find
conditions dynamically?

I am asking because I am using a find_by_sql call (which clobbers the
with_scope). How can I access the method scoping so that I can read it
and incorporate it into my query manually?

any answers to this. I’m finding myself in the same position. I’m
using the will_paginate plugin and I have a couple of find_by_sql calls
that I’d love to somehow get at the limit and offset and just modify my
sql to include those parameters…

actually, it appears that scoped_methods contains the hash of scoped
options.