On Thursday, May 11, 2017 at 9:25:43 AM UTC-7, Matt Campbell wrote:
>
> Jeremy,
>
> Currently we take advantage of not requiring a valid table for the purpose 
> of being able to use sequel's validation framework with objects that are 
> not database models. We created a "tabless_model" plugin to help us achieve 
> this. We do this for consistency within the application. We don't want to 
> mix sequel validations (for Sequel::Model classes) with ActiveModel 
> validations (for PORO classes) within the same app. For my usage, having 
> the model validation framework (with the errors object) broken out into 
> it's own module that we can use with objects that don't extend 
> Sequel::Model would be awesome.
>

One easy way to support this would be to just create a Sequel::Model 
subclass for this, and not require valid tables for it:

  FakeModel  = Class.new(Sequel::Model)
  FakeModel.require_valid_table = false
  class MyFakeModel < FakeModel
  end

Do you think that would be workable?  If not, you could just do:

  Sequel::Model.require_valid_table = false

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