# Changing paging created by scaffold

**URL:** <https://rubytalk.org/t/changing-paging-created-by-scaffold/42631>\
**Category:** ruby-talk\
**Created:** [30 November 2007 12:00 UTC](https://rubytalk.org/t/changing-paging-created-by-scaffold/42631 "2007-11-30T12:00:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junkone](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Junkone](https://rubytalk.org/u/Junkone)\
**Post date:** [30 November 2007 12:00 UTC](https://rubytalk.org/t/changing-paging-created-by-scaffold/42631/1 "2007-11-30T12:00:08Z")

</div>

hello  
the scaffolding created a list  
&nbsp;&nbsp;def list  
&nbsp;&nbsp;&nbsp;&nbsp;@trade\_pages, @trades = paginate :trades, :per\_page =\> 50  
&nbsp;&nbsp;end

how to i change it so that the @trades will contain the result of a  
custom sql?  
thanks  
seede
