# Changing paging created by scaffold

**URL:** <https://www.ruby-forum.com/t/changing-paging-created-by-scaffold/121740>\
**Category:** Ruby\
**Created:** [November 30, 2007, 1:00pm UTC](https://www.ruby-forum.com/t/changing-paging-created-by-scaffold/121740 "2007-11-30T13:00:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [November 30, 2007, 1:00pm UTC](https://www.ruby-forum.com/t/changing-paging-created-by-scaffold/121740/1 "2007-11-30T13:00:50Z")

</div>

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

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