method

quote_default_expression

Importance_0
v7.1.3.2 - 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 120
        def quote_default_expression(value, column) # :nodoc:
          if value.is_a?(Proc)
            value.call
          elsif column.type == :uuid && value.is_a?(String) && value.include?("()")
            value # Does not quote function default values for UUID columns
          elsif column.respond_to?(:array?)
            type = lookup_cast_type_from_column(column)
            quote(type.serialize(value))
          else
            super
          end
        end
Register or log in to add new notes.