Sha256: ce702008c0b6ad1f0d4fc2fc9aad0903b359492a23d5071a39321c3e00cabdf7

Contents?: true

Size: 274 Bytes

Versions: 43

Compression:

Stored size: 274 Bytes

Contents

module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Integer #:nodoc:
      module Conversions #:nodoc:
        def set(value)
          value =~ /\d/ ? value.to_i : value
        end
        def get(value)
          value
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
mongoid-0.5.8 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.5.7 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.5.6 lib/mongoid/extensions/integer/conversions.rb