Skip to content

Instantly share code, notes, and snippets.

View jsmpereira's full-sized avatar

José Santos Martins Pereira jsmpereira

  • Clearhaus A/S
  • Denmark
View GitHub Profile
@jsmpereira
jsmpereira / gist:1094024
Created July 19, 2011 23:46
Padrino pagination
#
# Adapted from http://pastebin.com/FL5KeQQH
#
# As mentioned on the link above put this on app/helpers/pagination.rb
# and you can use in your view
#
# =will_paginate @posts
#
# I'm also using this https://gist.github.com/837683
#
require 'active_record'
# Migrating from http://github.com/tobi/delayed_job to http://github.com/collectiveidea/delayed_job
# and with some jobs pending resulted in execution failure due to handler format incompatibility.
#
# This rake task loops through your delayed_jobs table and updates the handler of each job to comply with
# collectiveidea's delayed_job.
#
# Hope this can be useful to someone.
#