collectiveidea/delayed_job — pull request #479 by ngan (2013-02-12 21:04:17+00:00)
Title: Use AR#attributes instead of the instance variable

As of Rails 3.2.12, they can return different things.
For example, if the `foorbars` table has an integer column called "size" with default 0 and not null:

f = Foobar.new
f.attributes["size"].class #=> Fixnum
f.instance_eval{@attributes}["size"].class #=> Arel::Nodes::SqlLiteral

This fixes an issue where:

Foobar.new.to_yaml

would raise an error:
ArgumentError: wrong number of arguments (2 for 1)
from gems/arel-3.0.2/lib/arel/expressions.rb:3:in `count'