shopify_app_whitelist Gem

I regularly use shopify_app. Its a great way to get an app, embedded or not, up and running with Rails. Sometimes I'll create apps with shopify_app which are to be used by only one store. These apps sometimes have a front-end component for the themes... proxy integration, or…

Journey to Sucker Punch

Background jobs are great. Mailing, data processing, image processing, database operations… you name it. If its a repetitive blocking process for the user and its not time-sensitive, then its probably suited to be moved to a job. delayed_job My go-to ActiveJob adapter for Rails has always been Delayed Job.…

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…