On Tuesday, May 17, 2016 at 6:03:43 AM UTC-7, Tiago Cardoso wrote:
>
> Hi,
>
>
> I have this column for my table/model which is a postgres array. Having 
> already loaded the pg_array extension, I'm forced to convert the passed 
> array before, so that I can have the validations properly working. 
>
> MyModel < Sequel::Model
>
>   def myarray=(rubyarray)
>     super Sequel.pg_array(rubyarray)
>   end
>
> end
>
> Is that a way to avoid overwriting the setter? Or is this considered the 
> best practice for this? I find it a bit verbose. 
>

Sequel should handle this for you if you load the :pg_array extension into 
the Database object before creating the model class.  If that's not working 
for you, please post a minimal self-contained example showing the issue so 
I can debug.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to