Sha256: a679961cd5b40a4a9723862f118a2d8fa2b0fcce6d699c07c58ddce557015e5c

Contents?: true

Size: 395 Bytes

Versions: 19

Compression:

Stored size: 395 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Integer #:nodoc:
      module Conversions #:nodoc:
        def set(value)
          return nil if value.blank?
          begin
            Integer(value)
          rescue ArgumentError => e
            value
          end
        end
        def get(value)
          value
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
stonegao-mongoid-2.0.0.rc.6 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.rc.6 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.rc.5 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.rc.4 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.rc.3 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.rc.2 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.rc.1 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.20 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.19 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.18 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.17 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.16 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.15 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.14 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.13 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.11 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.10 lib/mongoid/extensions/integer/conversions.rb
mongoid-2.0.0.beta.12 lib/mongoid/extensions/integer/conversions.rb
mongoid-locomotive-2.0.0.beta9 lib/mongoid/extensions/integer/conversions.rb