Tuesday, October 4, 2011

Paginate an array using will_paginate

Paginate an array using will_paginate

Paginate an array using will_paginate

The will_paginate gem is a great bit of kit for adding pagination to your larger result sets. I recently had some trouble getting will_paginate to paginate an array. Naturally I checked the will_paginate Github page but failed to see a small entry in the wiki here (frankly I’ve never been a huge fan of the wiki on Github).

Next I went on to search “will_paginate array”. This got loads of results, most of which were completely useless as none seemed to specify the most important and only bit of information I needed.

So if you get an error message similar to “undefined method `paginate’ for # ” then try adding the line below to your controller.

1
require 'will_paginate/array'

Thursday, June 30, 2011

Cambodia e-Vsia Forum have been released.

Dear Travelers,

Greeting from Cambodia e-Visa, the only one electronic visa online in Cambodia.

To provide you guys easily to share, answer & ask the question or to discuss about e-Visa related information in the website http://www.mfaic.gov.kh/evisa/, we have just released the discussion forum at http://www.mfaic.gov.kh/evisa/Forum.aspx.

To post a new topic in any forum category you are required to login first. We have 5 forum categories as listing:
1. General Discussion
2. e-Visa support
3. e-Visa services
4. Payment
5. Technical

You are appreciated to post and share your ideas in the forum.
Read more at http://www.mfaic.gov.kh/evisa/About.aspx

Source: Cambodia e-Visa