I haven’t written here in a long time, so as many of you might not know yet, I’ve been learning Ruby on Rails the past 4 or 5 months. I’ll have to say I’ve run into some pretty big challenges, but overall Ruby on Rails is one awesome framework. My latest challenge has been getting DHH’s auto_complete plugin to work with Ryan Bates’ complex forms. It might not be the best way to do it, but the solution was to monkey patch ActionView::FormHelper and FormBuilder which I put in a seperate file in the /lib folder of my project. So without further ado, here’s the code:
Don’t forget to include the file in your environment.rb. If you see any bugs or know of a better way (I couldn’t find any solutions on the web), please let me know.