hi fred, Ya i can get your point,but in rails we will use scope instead of named_scope.If i try rake task separately means its working.
On Wed, Mar 9, 2011 at 5:24 PM, Frederick Cheung <[email protected] > wrote: > > > On Mar 9, 11:25 am, Colin Law <[email protected]> wrote: > > I had noticed that some queries don't get run till the collection is > > used, whereas others seem to run immediately. I did not find > > documented exactly how to tell in advance which will get run and which > > won't. I wonder whether using a named scope would guarantee delayed > > operation. > > (named) scopes are lazily evaluated. > > Fred > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

