How to get query which was created by Rails Model

how to get query which was created by Rails Model.
like ,if i write

Model.find(:all)

then output should be like below

“select * from models”

is there any idea ?

In logs/development.log if you are in development environment,
production.log if you are in production.

-Bill

check out the query_trace plugin, it logs where in the application a
query
was generated.

AD wrote:

check out the query_trace plugin, it logs where in the application a
query
was generated.

is there any model method to get those query ?