First weekend with Ruby on Rails. I can’t say it’s easy, but it is good. The meta classes created from the table definitions and the few lines of code (so far) in the model works great. I’ve already used stuff not mentioned in the tutorials. David (creator of Rails) loves to say “look at what I’m not doing”, well, by choosing the good examples it’s easy. I had to use
belongs_to :buyer, :class_name => "User", :foreign_key => "buyer_id"
already and that isn’t in the tutorial. And with the wiki totally spammed good information takes time to find. The above gives me no magic at all, I have to tell it what table to use and what column to use. Actually it give me some magic, it knows that User.id is the id to match against. Anyway, after creating the models, filling out the migrations and raking the server (”rake migration” runs all new migrations up to the latest version) it works great. The meta objects allows me to access related objects really nice, and I haven’t even created the class.
I still don’t really get how the controllers are going to work, but I’m quite confident with the models now, and I’ve stumbled over the routes file so I understand how to create the magic Ruby on Rails url schema. And I understand some of the console (which is a nice feature) so I can create and test objects without even going to the webpage.
I haven’t created a blog in 15 minutes, but I have created the skeleton my site in several long hours
