erez.bens-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Mar-16 09:12 UTC
Advanced search form & Named scopes
I have an Asset model in a Real Estate app See the Search form & Model here: http://www.qcm.co.il/qcme/index.html What is the best way to join all named_scope(asset_params) (lines 27..34) to line 36 Thanks Erez --~--~---------~--~----~------------~-------~--~----~ 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 16, 9:12 am, "erez.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <erez.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have an Asset model in a Real Estate app > > See the Search form & Model here:http://www.qcm.co.il/qcme/index.html > > What is the best way to join all named_scope(asset_params) (lines > 27..34) to line 36 >What you can do is scope = self scope = scope.assettype_filter(...) if (...) scope = scope.dealtype_filter(...) if (...) ... scope.paginate ... Fred> Thanks > > Erez--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---