Sha256: b20ac4a17168c77a05c83987e0331adb994743b35036dc58b1e6873718b6ca3b
Contents?: true
Size: 240 Bytes
Versions: 5
Compression:
Stored size: 240 Bytes
Contents
module BooleanField extend ActiveSupport::Concern module ClassMethods def boolean_field(name, default = true) field name, type: Mongoid::Boolean, default: default scope name, -> { where(name => true) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems