I'm trying to define a subset in a Model:

class User < Sequel::Model
subset :active, Sequel.~(:inactive)
# proc
subset :name, -> (name) { where( Sequel.like(:username, 
"%#{params[:name]}%") ) }
end

When I attempt to use the model, I get an error:

`<class:User>': undefined method `subset' for User:Class (NoMethodError)

What am I not understanding?

Are procs allowed?

Thanks.

-- 
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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/d610243b-7b64-4c3b-b1a4-de54bd0a0e60n%40googlegroups.com.

Reply via email to