lib/sequel/plugins/boolean_subsets.rb in sequel-4.32.0 vs lib/sequel/plugins/boolean_subsets.rb in sequel-4.33.0
- old
+ new
@@ -47,11 +47,12 @@
[c, {c=>true}]
end
# Add subset methods for all of the boolean columns in this model.
def create_boolean_subsets
- cs = columns rescue return
- cs.each{|c| subset(*boolean_subset_args(c)) if db_schema[c][:type] == :boolean}
+ if cs = check_non_connection_error{columns}
+ cs.each{|c| subset(*boolean_subset_args(c)) if db_schema[c][:type] == :boolean}
+ end
end
end
end
end
end