Posts tagged ruby

Feb10

More STI Tricks

ruby OOP STI | comments

Obviously, I’ve been using STI for a recent project.

Alex Reisner has a post full of tips, a cool one being overriding the model_name class method for your parent class, so that when you do form_for @sub_class... you still get params[:parent_class] delivered to your controller.

Continue reading »

Feb08

Getting a pretty list of subclasses

ruby OOP | comments

Perhaps you are using something like Single Table Inheritance, or are simply for some other reason using a parent class with several subclasses. It can be convenient to be able to quickly get a list of the subclasses of a given parent class.

Continue reading »

Oct09

Scanty on Dreamhost

ruby dreamhost sinatra scanty | comments

I didn’t use capistrano, or really use any best practices whatsoever. This was a quick and dirty straight-to-the-server install.

Scanty is an extremely lightweight blog written using Sinatra and Sequel. Here’s how it was rolled out here.

Continue reading »