Hi, I have been using named_scopes and works great! but I need to get the sql conditions to send for my iReport =) when I do User.valid.proxy_options returns ok but User.valid.created_by(''jonatas'').proxy_options returns just proxy_options from last named scope if I put: (User.valid.created_by(''jonatas'')).proxy_options also returns just proxy_options from last named scope so, how can I get proxy_options from nested named_scope''s? how can I get sanitize sql for nested named_scope''s? thx''s -- 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 -~----------~----~----~----~------~----~------~--~---
On Mar 19, 1:47 pm, Jonatas Paganini <rails-mailing-l...@andreas- s.net> wrote:> Hi, I have been using named_scopes and works great! > but I need to get the sql conditions to send for my iReport =) > > when I do > > User.valid.proxy_options returns ok > > but > > User.valid.created_by(''jonatas'').proxy_options > > returns just proxy_options from last named scope > > if I put: > > (User.valid.created_by(''jonatas'')).proxy_options > > also returns just proxy_options from last named scopeWell in general in an activerecord method scope(:find) returns the current scope for find operations, and it''s no different here: User.valid.created_by(''jonatas'')).scope(:find) Fred> > so, how can I get proxy_options from nested named_scope''s? > > how can I get sanitize sql for nested named_scope''s? > > thx''s > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks very much man! Works rigth now! -- 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 -~----------~----~----~----~------~----~------~--~---