Code Completion for Dynamic Finders
By Erno Mononen on Mar 09, 2009
Rails has had dynamic finders for ages (from the very beginning if my memory serves me right) and we've also had support for them in the IDE. However, we've only supported simple finders, such as "find_by_foo" or "find_all_by_bar", and not the newer "find_by_foo_and_bar_and_baz" kind of finders. After seeing how Petr Hejl implemented support for the Grails equivalents, I finally got around to add support for them in Rails too. So here's a couple of screenshots of the feature in action: The first code completion invocation will offer you the "first level" finders and "..." variants for continuing further: And this is what you get after choosing "find_by_price_and..." in the above (and invoking CC again): Now I still need to add similar support for dynamic scopes that are coming in Rails 2.3.