On Apr 7, 1:21 pm, Tom Mac <li...@ruby-forum.com> wrote: > Hi > Then how can I check that it is not triggering sql. I did not > understand it properly. Could you explain more please? >
Look in your development log and ensure that you don't touch the scope - when you do anything other than adding conditions, joins etc. to the scope you force active record to evaluate it. Fred > Frederick Cheung wrote in post #991438: > > > On Apr 7, 10:49am, Tom Mac <li...@ruby-forum.com> wrote: > >> Hi Fred > >> Thanks . I tried from sample application also like > >> def index > >> @articles = Article.where(:hidden => true) > >> puts @articles.inspect > >> ------------- > >> end > > >> Here also the query executed. I dont know why. > > > because you called inspect on @articles > > > Fred > > -- > 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.