instance method with_yaml_fallback

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Last seen in v5.2.8.1 Private

Signature

with_yaml_fallback(value)

Fixture value is quoted by Arel, however scalar values are not quotable. In this case we want to convert the column value to YAML.

Parameters

value req
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 509
        def with_yaml_fallback(value)
          if value.is_a?(Hash) || value.is_a?(Array)
            YAML.dump(value)
          else
            value
          end
        end

Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 509 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements

Type at least 2 characters to search.

↑↓ navigate · open · esc close