Developing sanely on Windows

Preamble You might think, "Why are you trying to develop on Windows? Why not use OSX or (insert Linux distro)". Its because I'm preparing for a stable future. With the decisions of Apple the past year with the iPhone and new Macbook, I no longer like the direction…

Testing with shopify_app

shopify_app is a great Gem to quickly build a Shopify App with Rails. It handles all the verifications, authorizations, webhooking, and more; leaving you to focus on developing your app. This post is to serve as a quick-tip on how to unit-test your app with the Gem. Other than…

Counting Unique Options in Shopify

Ever wanted to quickly display a how many of an option a product contains? Available in 4 sizes ... Available in Red, Blue, Green ... Available in 10 colors Here's an example of how to do just that (for color). Simply open your product's loop liquid and add this block at the…

Precompiling Assets In Your Rails Engine

This'll be a quick post to highlight an issue I had where I needed to precompile an asset file for my Rails engine that was not to be compiled with the other engine assets. Recently, I added TinyMCE-Rails to Guts instead of rolling it in on its own. This allows…

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…