-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
I use mongoid 2.4.7 right now and have following definition:
field :n, type: Integer, :as => :issue
When I now create an Object that sets n: 20ssss it is saved as String
a = Foo.where(n: "20ssss").first
=> #<Foo _id: 4f83969534442ed981000005, _type: nil, p: "words words", s: "more words", n: "20ssss", v: 1, h: "b12c565e99c37285e0fe7c8b49b71df23b82ec73">
> a.n.inspect
=> "\"20ssss\""
This was already mentioned in this thread:
http://groups.google.com/group/mongoid/browse_thread/thread/fa2adeaa0a21dd6b
Unfortunately I could not find a relating Issue here on GitHub and I am running into the same problem even it was mentioned there two months ago.
Am I missing a setting or why does this do something (in my perception) unintended?