rails/rails — pull request #6967 by frodsan (2012-07-05 03:36:45+00:00)
Title: fix quoting for ActiveSupport::Duration instances

This patch fixes quoting for ActiveSupport::Duration instances:

# before
>> ActiveRecord::Base.connection.quote 30.minutes
=> "'--- 1800\n...\n'"

# after
>> ActiveRecord::Base.connection.quote 30.minutes
=> "1800"

Also, adds a test for type casting ActiveSupport::Duration instances.

Related to #1119.