Archive for 'Ruby'

Introduction to delayed_job

I gave this short presentation at the November bmore-on-rails meeting last night. Flip Sasser also presented an overview of Resque, andĀ Michael Dotterer showed us a bit about background_job.

We decided that delayed_job is an easy and solid way to get background tasks running in your Rails app, but if you are a massive site that needs a heavy-duty and configurable solution, then Resque may be what you need. Resque’s complexity makes this a non-trivial decision! Start with delayed_job since it’s so quick to implement, and you can always choose another solution later.

Want to get delayed_job running in your app in 10 minutes? Follow the steps in Delayed Gratification with Rails.

Wrapping a div around will_paginate page_entries_info

The page_entries_info view helper looks great, but it is just plain text; I can’t add margin or padding or float it. Here’s a quick alias_method to wrap it up in a div with the class of your choice.

Just drop that into an file in config/initializers, restart, and get styling!

I just entered RPCFN #2

I don’t consider myself a Ruby newbie, but I was drawn to theĀ Ruby Programming Challenge For Newbies #2 today. I’ll post and explain my solution when the contest is over! Thanks to Chris Strom for submitting the challenge!