-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
I have came across an issue when trying to persists localized documents:
I have a model with:
field :name, type: String, localize: true
validates_uniqueness_of :name
And when I run Model.new.valid?
I get:
Unable to find source-code formatter for language: nomethoderror. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
: undefined method `inject' for nil:NilClass` in `lib/mongoid/validatable/uniqueness.rb:126:in `criterion'
`
I have wrote a small test for it and changed the behaviour of the method so that valid? would return false in this case. Feel free to merge if it's any useful.
Thanks for the library.
cheers