Default Filtering on Models #1985
eraffel-MDSol
started this conversation in
General
Replies: 1 comment 4 replies
-
class Foo < Sequel::Model(DB[:foos].exclude(:soft_deleted))
end |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to have filtering executed by default for a model? For example, let's say the table has a boolean property,
soft_deleted
, and I want the model to only return records wheresoft_deleted
is false when querying the modelBeta Was this translation helpful? Give feedback.
All reactions