From: David Heacock Date: 2007-02-03T05:48:23+09:00 Subject: Re: Beginner Question - Pagination, Each? David Heacock wrote: > Justin Bailey wrote: >> On 2/2/07, David Heacock wrote: >>> <%= if @member_pages.each >>> link_to 'Go to page >', { :page => ()} >>> end >>> %> >>> >>> I get an error "no block given" >> >> You have a basic syntax error - missing the "do" keyword: > > Thanks Justin. I dropped the conditional and tried this: > > <%= link_to 'Go to page >', { :page => @member_pages.each do () end} %> > > This did not produce an error message, but it also did not produce what > I wanted. Instead, it produced a link to the last page. Well a few more hours of searching the web produced this excellent link. http://wiki.rubyonrails.org/rails/pages/HowtoPagination Thanks to all from a scary beginner! -- Posted via http://www.ruby-forum.com/.