I would like to print into log or console the executing sql. Where can I make some settings? In hibernate it is in a config file possibility: I think here should be something like that too.
I have a code part similar to this:
myresult = MyActiveRecordClass.find(:all, :select => "mytable1.*, mytable2.field1", :joins => :mytable2, :conditions => "somefield= #{somefield}", :order => "another_field desc", :offset => offset, :limit => limit)
This is a simpler case to translate by hand, but I would like to have all the native sql in a console or in file. It could be usefully at searching