Rewrote Mongoid::Search::Util.keywords, now it can be used with methods as well.
Also, it has to work with more nesting levels than one (not only with parents, but also with grandparents), but it didn't because of mongoid's callback order (durran said he will rewrite it in 4.0.0).
I've added some tests to describe this situation.
Rewrote Mongoid::Search::Util.keywords to work with methods
Red and green test to describe situation when setting grandparent's(d…
…eep) fields as keywords
Test for specifying method as keyword
Added support for localized fields
This pull request cannot be automatically merged anymore. Please take a look and fix the conflicts.
Also, please ensure that no previous functionality is broken. After fixing it I'll merge.
Merge branch 'master' of git://github.com/mauriciozaffari/mongoid_search
Merged, also all tests are green, so I think previous functionality should not be broken.