Wednesday, October 17, 2007

Cool ActiveRecord Completion Support

Previously I have complained about Rails and how the attributes of a model aren't properly visible on the model as such (because they are automatically added at runtime by matching it to its table). The only way for me to get a complete picture of a model, is to look both into the migrations that work on the table of the model and into the model itself, and then combine these views.

Well, seems like others had the same trouble but did something about it. Tor Norbye show some screenshots of the latest new Netbeans support for ActiveRecord completion here, which actually does this. Netbeans is looking into the migrations and into the model, and then supports code completion in the IDE with all the information it collects. Supposedly it does not stop at the migration that creates a table, but also recognizes later migrations that change the schema. Things like rename of columns.

Cool! Simply cool!


Ben said...

Another option you might find useful is Dave Thomas' annotate models plugin.

Per Olesen said...

Hi Ben. Thanks for the tip. I saw it some time ago, but I mostly see it as kind-of a hack. I can see it can be helpful, when looking at the model source.

Anonymous said...

Dear Per Olesen,

We interested in your expertise in flex. How do i contact you.Please send me e-mail.