1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Francesco Rodriguez
b5bb35355d 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.
2012-07-04 22:39:16 -05:00
Egor Lynko
7f160b06a2 Prevent creating valid time-like objects from blank string from db
Issue #6045
2012-05-05 23:35:25 +03:00
James Sanders & Jason Noble
13823a4cf3 Don't type cast values that don't respond to to_i to 1 2012-04-30 11:37:31 -06:00
Santiago Pastorino
16c4cb04d4 on and ON are type casted to a true boolean column 2012-01-11 23:20:13 -02:00