# Method to display sql queries

**URL:** <https://www.ruby-forum.com/t/method-to-display-sql-queries/173863>\
**Category:** Rails\
**Created:** [August 17, 2009, 10:09am UTC](https://www.ruby-forum.com/t/method-to-display-sql-queries/173863 "2009-08-17T10:09:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anandhkumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Post date:** [August 17, 2009, 10:09am UTC](https://www.ruby-forum.com/t/method-to-display-sql-queries/173863/1 "2009-08-17T10:09:21Z")

</div>

Hi everyone

```
   Is there any method in RoR to extract the SQL query from model

```

class and display it in the browser… Any help would be  
appreciated…

Thanks

Anandh

---

<div class="post-metadata">

**Author:** ![anandhkumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Post date:** [August 17, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/method-to-display-sql-queries/173863/2 "2009-08-17T21:45:20Z")

</div>

you can see the queries in the development logs

---

<div class="post-metadata">

**Author:** ![anandhkumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Post date:** [August 18, 2009, 5:06am UTC](https://www.ruby-forum.com/t/method-to-display-sql-queries/173863/3 "2009-08-18T05:06:07Z")

</div>

Anandh K. wrote:

> Hi everyone
> 
> ```
> Is there any method in RoR to extract the SQL query from model
> 
> ```
> 
> class and display it in the browser… Any help would be  
> appreciated…

There is a plugin that does this, but I can’t remember what it’s called.

> Thanks
> 
> Anandh

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![anandhkumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Post date:** [August 18, 2009, 6:43am UTC](https://www.ruby-forum.com/t/method-to-display-sql-queries/173863/4 "2009-08-18T06:43:53Z")

</div>

Thanks samer. Yeah i see it in th development logs. But for some  
purpose i want those queries to get displayed in the browser. Is there  
any way.

Thanks

Anandh
