Bob Sanders
2007-Nov-18 11:55 UTC
How do you number your posts (e.g. Post #1, Post #2, etc.)?
Is there an easy way to number your posts (e.g. Post #1, Post #2, etc.)? I tried doing a count loop, but that doesn''t work with pagination -- as the numbers will just start over. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Igor K.
2007-Nov-18 12:15 UTC
Re: How do you number your posts (e.g. Post #1, Post #2, etc
Bob Sanders wrote:> Is there an easy way to number your posts (e.g. Post #1, Post #2, etc.)? > I tried doing a count loop, but that doesn''t work with pagination -- as > the numbers will just start over. > > Any ideas?But you always know page number. just do page_number*items_per_page + i ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---