These are chat archives for dry-rb/chat
includedhook and class-eval
module MyThing def self.included(base) base.class_eval do attribute :foo, Types::Strict::String end end end
module MyAttrs def self.included(klass) klass.class_eval do # aaand Tim was faster end end
hey folks, sorry to bother
class Traces < ROM::Relation[:sql] schema(:traces) do attribute :id, Types::Serial attribute :trace, Types::JSONB end end
that doesnt seem to work for the Jsonb in postgres
I've tried https://github.com/rom-rb/rom-sql/blob/master/lib/rom/sql/extensions/postgres/types.rb#L39-L58 most of these but no way.