Nov
I was just sent the link to RoRAPI. It’s a painfully simple but really useful search engine for the Ruby on Rails API, powered by Google Co-op.

Thanks to Brad Gessler for putting it together.

I was just sent the link to RoRAPI. It’s a painfully simple but really useful search engine for the Ruby on Rails API, powered by Google Co-op.

Thanks to Brad Gessler for putting it together.
Single Table Inheritance in Ruby on Rails is cool, and has made my code oh so beautiful in several cases. I ran across an interesting problem yesterday with inheritance classes, and I thought I’d share my solution.
Imagine you have parent class NinjaTurtle, and four subclasses Leonardo, Donatello, Michaelangelo and Raphael.
class NinjaTurtle < ActiveRecord::Base
end
class Leonardo < NinjaTurtle
has_many :katana
end
class Donatello < NinjaTurtle
has_one :bo
end
class Michaelangelo < NinjaTurtle
has_many :nunchaku
end
class Raphael < NinjaTurtle
has_many :sai
end
So a typical new or create action in any turtle’s controller would look like a bit like this
@donatello = Donatello.new
What if you want one inherited action called new that will create any type of NinjaTurtle, depending on who’s controller handled the request?
UPDATE SEP 24, 2007: Almost a year later, this is by far the most popular article on my blog. Thanks to everyone who has contributed their feedback and helped make this guide really work. I have updated the article to reflect some new versions of some software and filled in a few holes that may have tripped some people up.
DreamHost has become a pretty popular choice for many people looking for a reliable Ruby on Rails host. I’ve been with DreamHost for about six months now, and I’d say they’re pretty stellar. This blog is hosted on DreamHost, as well as my Wamily project (while we’re in development and light testing—hopefully we’ll outgrow the shared host soon) and things are running well. They also offer a ridiculous amount of disk space and bandwidth for the price.
One of the best things about DreamHost is that they allow you to manage pretty much every aspect of your environment. You have the ability to log in to the server via SSH and compile and install any of your own packages or Ruby gems. DreamHost does have a centrally controlled version of most of the basic things (including Ruby and Rails), but a lot of times they’re a little slow on the upgrade path when the latest new versions come out.
For that reason, and also for practice when I really have to maintain my own server, I’ve decided to manage all of my own versions of Ruby, Rails, and most of my gems.
Here’s a quick how-to be a control freak on DreamHost after the fold …
Welcome to the real Nate Clark, my new blog about technology from the perspective of an opinionated technologist and web developer.
I started this blog with two goals in mind. First, I really wanted to find some way to give back to the community of open source users. Most of my programming and design skills are self taught, with the help of articles and messages that I’ve found on the internet. This blog will be my way to publish my useful knowledge to the world.
Secondly, it’s time for the real Nate Clark to start networking. Now that I’m a full-time web professional, I wanted to use this blog to communicate with other web developers and entrepreneurs. Please post comments or get in contact.
So, why the real Nate Clark? Well, this is the third reboot of nateclark.com, my personal website which I have had for years (older version) (really old version) . A few years ago, I got a nice anonymous email from some kid, apparently also named Nate Clark:
u are not nate clark because i am nate clark so chek it homie
Whatever, kid. I’m the real Nate Clark. I bought the domain name first.
I’m also getting ready to embark on a long awaited career change—I’m leaving the world of corporate consulting, where I have been a visitor for the past three and a half years, and taking a chance to do web development and entrepreneurial ventures full time. I feel like I have been a corporate pretender for so long, and now finally on a career path doing what I really love to do … say hello to the real Nate Clark.
Anyway, welcome to my new blog. Enjoy your stay.