Tuesday, November 11, 2008


Journey to the Heart, a poem (89800031)Image by Shutterhack via FlickrI wrote a little Rails app called Modelizer back when I was first learning about Rails model associations.

Modelizer looks at the databases that your other Rails are using and identifies possible associations based on the naming conventions Rails uses for database table and column names.

Modelizer creates an ActiveRecord object that connects to the selected application's database using the credentials in each app's database.yml.

What should normally go in the model for an MVC app was pretty hard to pin down for this app, so most of what should be in the model is stuck in the controller. The model isn't specific to one schema, but actually would have to use databases instead of tables and hadn't really wrapped my head around how to do that. Basically, ActiveRecord handles tables, not entire databases and this app treats all of your schemas as the model.

This also uses AJAX when you drill down into tables and the possible associations for each.
Reblog this post [with Zemanta]

No comments: