Showing posts with label Ruby. Show all posts
Showing posts with label Ruby. Show all posts

Wednesday, February 24, 2010

Intuit Ruby with Ruby Koans

SAN FRANCISCO - SEPTEMBER 25:  A zen garden cr...Image by Getty Images via Daylife

The ruby koans plugin promises to "walk you along the path to enlightenment" in your quest to understand the finer points of ruby.

A koan is a Zen Buddhist concept meaning "a story, dialogue, question, or statement; the meaning of which cannot be understood by rational thinking, yet it may be accessible by intuition."

Koans encourage test driven development by presenting you with tests of ruby code and challenges you to make the tests run successfully by fixing the code. Presumably, once you have acquired the intuition targeted, your test will run.

Ruby can be challenging but has a lot of power and flexibility. And some day, maybe even scalability :-)

Tuesday, November 11, 2008

Modelizer

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]