Clear the instance filters after successfully destroying the object.
# File lib/sequel/plugins/instance_filters.rb, line 53 def after_destroy super clear_instance_filters end
Clear the instance filters after successfully updating the object.
# File lib/sequel/plugins/instance_filters.rb, line 59 def after_update super clear_instance_filters end
Freeze the instance filters when freezing the object
# File lib/sequel/plugins/instance_filters.rb, line 65 def freeze instance_filters.freeze super end
Add an instance filter to the array of instance filters Both the arguments given and the block are passed to the dataset’s filter method.
# File lib/sequel/plugins/instance_filters.rb, line 73 def instance_filter(*args, &block) instance_filters << [args, block] end