module Sequel::Plugins::BooleanSubsets::ClassMethods
Private Instance Methods
Source
# File lib/sequel/plugins/boolean_subsets.rb 48 def boolean_subset_args(c) 49 [c, {c=>true}] 50 end
The arguments to use when automatically defining a boolean subset for the given column.
Source
# File lib/sequel/plugins/boolean_subsets.rb 53 def create_boolean_subsets 54 if cs = check_non_connection_error(false){columns} 55 cs = cs.select{|c| db_schema[c][:type] == :boolean}.map{|c| boolean_subset_args(c)} 56 dataset_module do 57 cs.each{|c| where(*c)} 58 end 59 end 60 end
Add subset methods for all of the boolean columns in this model.