BlipTV API In Ruby

I recently needed to do some work for a client to integrate their site with blip. The blip tv wiki points ruby developers to a decent project. However, my needs were a lot more intricate than what the current gem covers. I forked the project and added in the functionality that I needed (as is the case for most open source needs). Along the way, I found out that bliptv has a json api. I couldn’t resist and converted the bliptv gem to leverage the json api. Probably a faux pas, but it is faster than rss/xml parsing. ...

October 14, 2009 · 1 min · 186 words · Brandon Harris

Why aren't you using Active Scaffold?

I do a lot of work creating admin interfaces in rails. A lot of it is redundant, so it would be nice to use a canned solution. Django has an admin interface built into every project. This makes a developers life easier. I thought “Wouldn’t it be nice to have a plugin that read all my table associations and provided a simple crud interface?” That is exactly what Active Scaffold tries to be. ...

July 7, 2009 · 2 min · 371 words · Brandon Harris

Populate Object Instance Variables From Hash

I recently needed to write a class in ruby that I wanted to behave similarly to an ActiveRecord based class, but without the database ties. Particularly, I wanted to do this: r = Record.new({:attribute1 => "a", :attribute2 => "b"}) It’s not too hard to hard code a simple class with attributes that are defined by a Hash, but in the pursuit of elegance, I wanted it to be more generic. I pulled up this little snippet: ...

May 18, 2009 · 1 min · 154 words · Brandon Harris