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