Flowdock
method

quote_default_expression

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Quoting
quote_default_expression(value, column) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 64
        def quote_default_expression(value, column) # :nodoc:
          if value.is_a?(Proc)
            value.call
          elsif column.type == :uuid && value.is_a?(String) && /\(\)/.match?(value)
            value # Does not quote function default values for UUID columns
          elsif column.respond_to?(:array?)
            value = type_cast_from_column(column, value)
            quote(value)
          else
            super
          end
        end
Register or log in to add new notes.