rom-rb / rom-mongo

(Looking for a maintainer) MongoDB support for rom-rb
https://rom-rb.org
MIT License
33 stars 22 forks source link

Mongo::Struct constructor_type is broken #24

Open v-kolesnikov opened 6 years ago

v-kolesnikov commented 6 years ago

Hi, folks!

I assume ROM::Mongo::Struct was broken after this commit: https://github.com/dry-rb/dry-struct/pull/55/files

https://github.com/rom-rb/rom-mongo/blob/cc335a47ee8504eb9ed660e130daea2557a235b8/lib/rom/mongo/struct.rb#L4-L8

I think we can just remove this option and inherit :permissive option from ROM::Struct. I would love to make PR as well.

@solnic @GustavoCaso

GustavoCaso commented 6 years ago

Yes @v-kolesnikov with the latest version of dry-struct this will raise an error.

I haven't use rom-mongo ever but I think what you are suggesting is a good idea.