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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Seemingly Similar Threads
- So how can I rewrite my app without using with_scope?
- Rails Plugin: meantime_filter for controllers (actions within blocks)
- has_many relationship extensions and scoping rules
- has_many :through and foo.bars.include?
- Acts_As_Taggable Plugin multiple controllers.