method

cast_bound_value

rails latest stable - Class: ActiveRecord::ConnectionAdapters::MySQL::Quoting
cast_bound_value(value)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/mysql/quoting.rb, line 12
        def cast_bound_value(value)
          case value
          when Rational
            value.to_f.to_s
          when Numeric
            value.to_s
          when BigDecimal
            value.to_s("F")
          when true
            "1"
          when false
            "0"
          when ActiveSupport::Duration
            warn_quote_duration_deprecated
            value.to_s
          else
            value
          end
        end