I was banging my head against the wall today trying to add a before_save filter to a model that was getting saved in a nested form. It seems that only the top level model’s callbacks will be called. So say you have save some kind of Order with many LineItems all at once (via the [...]
I’ve been hearing a lot about Node.js recently, so I decided to install it and give it a whirl. I know I’m a little late to the game, but here’s my breakdown of Node.js; What is Node.js? This one took a little while to get my head around but essentially node.js allows you to do [...]
Today I needed to output a blog excerpt similar to the_excerpt() in Wordpress. I came up with the following Ruby on Rails function that seems to work pretty well.
The other day, I created a Wordstream API WordPress plugin for use on my business partner Joel and I’s site Domain Superstar. As part of that process I wrote a PHP wrapper class for Wordstream. I offered it to Wordstream, and they decided to use it as part of their example code and were kind [...]
In response to a user request, I recently added the ability to restrict access to my Copyscape Plugin to only certain WordPress roles. WordPress provides some pretty simple APIs to manipulate Capabilities and Roles which can be invaluable in plugins where you want to limit access to certain functionality. I think this functionality is something [...]
A lot of the new WordPress sites I’m working on have custom post types. A lot of plugins that I use haven’t caught up with the new functionality yet, and the Google Sitemap Generator is no exception. I found a patch here that uses an existing hook in the plugin and seems to work great [...]
John Gadbois is a web developer living Gales Ferry, CT.