I'm Travis, a 10 year veteran software developer with a broad background in web technologies and
software markets. I've been working with Rails as my weapon of choice for the last 3 years, and
more recently, developing applications on the iPhone SDK.
A refactoring habitué and TDD adherent, I've
a special interest in software development as a craft and science.
LATEST PROJECT: Secure Rails Admin Backend With Authlogic and Multiple Sessions
Thoroughly supported, inconspicuously documented, authlogic lets you manage multiple user sessions -perfect if you want to allow users to login to your application under separate accounts, or as in the following case, if you want to build an administrative backend secure from potential session hijacks.
Viewing the logs for queries utilizing acts-as-taggable-on and stacked tag scope recently, I noticed that joins against the Tag table from the Tagging table on tags.id and tags.name weren’t using indexes.
Certain errors in Rails send a shiver down the spine because they deal with generated SQL which can be such a dreadful problem to fix. Today I got the shivers from acts-as-taggable-on and the following error message:
PGError: ERROR: column reference "context" is ambiguous
The source of the problem is the plugin’s dynamic tag contexts and [...]
A recent issue of Rails Magazine published an article by John Nunemaker on web hooks in rails, along with a concise example for triggering hooks on models using an observer class. I’ve followed this lead, but found a few basic changes necessary to make the solution more tractable for use in a typical Rails API setup.
acts_as_taggable_on is a great plugin with some useful feature hooks like user-owned tagging. I’ve extended the tag owner hooks with a few finder methods to traverse tagger relationships, and squashed a crucial bug that rejects valid owner taggings during the taggable model’s save_tags callback.
In the first part this tutorial I demonstrated how to save player scores for an iPhone game. In this post, I’ll explain how to add online support by building a high scores web service in Rails, securing the submissions, and using git to deploy (for free) onto heroku.
One of the principles behind this tutorial was [...]
My latest Sogeo work is getting quite a lot of distance out of tagging. With mbleigh’s acts_as_taggable_on I’ve been able to conveniently normalize several different data dimensions down into a tag model.
Modeling this was easy enough, but today I ran into an issue when constructing some of the more sophisticated filtering queries.
acts_as_taggable_on utilizes [...]
Friend networks and activity feeds are mainstay features of social media applications, and designing an implementation that won’t scar your code with the complexities of bidirectional logic and messaging queues is never easy.
ActiveRecord associations are magical, and if you embrace the sundry offerings of finder plugins the world of parameterized queries becomes a vast and wondrous landscape indeed. So how do Rails developers typically organize and build dynamic queries without drenching their code in switch blocks, multiplying filter methods on the model, or contriving vestigial routes for search- and report- like GETs?
If there is a combinatorial way to bring aspects of a framework together in a breaking edge case, I will find that way and take that step. It’s a destiny one follows gladly; an instinct useful in defining the boundaries of an application’s logical complexities as they accumulate on the brain like bit patterns.