Sha256: 473661c67c438ae21b644e1b147c5ebc59d274a83537390ef13dac895ad77616

Contents?: true

Size: 294 Bytes

Versions: 26

Compression:

Stored size: 294 Bytes

Contents

module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Boolean #:nodoc:
      module Conversions #:nodoc:
        def set(value)
          val = value.to_s
          val == "true" || val == "1"
        end
        def get(value)
          value
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
mongoid-0.9.4 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.9.3 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.9.2 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.9.1 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.9.0 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.10 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.9 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.8 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.7 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.6 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.5 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.4 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.3 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.2 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.8.1 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.7.10 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.7.9 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.7.8 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.7.7 lib/mongoid/extensions/boolean/conversions.rb
mongoid-0.7.6 lib/mongoid/extensions/boolean/conversions.rb