Guts: With Multisite

This is just a quick and proud update that I've released a lengthy update to Guts which includes multisite abilities. Meaning, you can run the same Guts admin interface for multiple domains. It also includes a handy concern for enabling multisite support on your application. Right from the docs is…

Building a Simple Redis Autosuggest with Ruby

So you have a search box on your website.. an article search, a product search.. whatever it may be, you may find yourself the need to display suggested results to your user based on what they type. Redis is the perfect solution. Planning Let's say we have a bunch of…

Extending a Rails Engine

Redesigning my CMS in Rails has been great fun. Theres been many challenges faced, and many conquered (like having 100% code coverage :D). One thought that crossed my mind after building the monster was how do you extend an engine? By extending, I mean to add or overwrite methods of…

Polymorphic and Route Concerns... who is who?

The goal of this post is to outline some tips on easily figuring out the parent object for a polymorphic modal/route/controller. Let's start with the basics... Polymorphic For those unfamiliar to it, Polymorphic is an Active Record association type where a model can belong to other models. As…

Now: Kegging

Under the tree Christmas day, there was a large wrapped box from my friends. It sat there for a whole week and I was extremely curious to what it was, especially for something that size to be shipped down to me. Christmas day came and I opened the box... I…

ActiveRecord and Liquid Drops with Sinatra

Normally I use ERB when doing templates but there was a special use-case recently where I needed to allow the app user to modify a specific template. Liquid templates (what Jekyll and Shopify uses) was perfect for this situation because it has a simple syntax for anyone to pick up…

Calculating Percent Saved with Shopify

Visually displaying to the customer how much they are saving is a big help to driving them towards a purchase. This is a simple snippet and guide to help you achieve this functionality in your Shopify stores. First, to calculate the percentage saved, lets look at the basic math for…

all_products... finally

Shopify has finally implemented a global variable for accessing products. Shopify has global variables for many things like Collections, Linklists, pages, etc, so you can do things such as access a collection by its handle collections.my-cool-toys.products. However, it always lacked the ability to look up products by their…

WP User Themes

I've released a unit-tested plugin called Wp User Themes. It allows users to switch themes in their profile section (useful for development!) You can checkout the plugin here Cover image credit: Ben Kolde…

Get Original Sized Images from a Wordpress Post Gallery

Recently I was working on a project where I needed to modify an existing page which had multiple galleries. This change required me to have access to the original uploaded images. Heres a simple function I wrote which returns the images easily in an array format. # Input Hey comes see…