Many thanks to anyone willing to assist.
I have a rails database application that produces about 20 pages showing
10 lines each. I'd like a link at the bottom to each page that looks
like many you have seen: Go to page 1 | 2 | 3 | 4 | etc.
Tried to use the "each" method as follows:
<%= if @member_pages.each
link_to 'Go to page >', { :page => ()}
end
%>
I get an error "no block given"
The following snippet:
<%= if @member_pages.current.next
link_to 'Next page', { :page => @member_pages.current.next }
end
%>
DOES produce a link to the next page! But I didn't figure this out. It
was part of the tutorial. I'd appreciate any help. I bought every book
on the subject, but I'm too new to know what I'm reading.
Thanks in advance!
--
Posted via http://www.ruby-forum.com/.