Chris Blunt

Hi, I'm Chris.

I'm a consultant and software developer based in Plymouth, UK. This site is a collection of tutorials, thoughts and things I've learned in code, life and running my business.

Today, I mostly help people and organisations who use Ruby on Rails. I enjoy learning new tools and technologies, though, as well as the art of business. This means I'm often dabbling with new languages and frameworks, and posting what I learn. My now page describes what currently has my attention.

You can follow and contact me on Twitter, Instagram, LinkedIn, and Facebook.

Finally, if you enjoy the content on this site, please join my newsletter to get notified when I post something new.

No spam. Unsubscribe at any time.

Rails on Docker: Quickly Create or Update Your Gemfile.lock

As I migrate all of my Rails apps to Docker, I’ve learned to avoid making changes to the Gemfile whenever possible.
Posted in rails, docker, bundler

Rails: Generating Polymorphic URLs when Model name does not match Route

Given a slugged generic model for which you want to generate a URL at runtime, you can usually just call:
Posted in rails, howto, programming

Android: Toggling Your App's Theme

I was recently asked how an app’s theme can be toggled by the user in Android. This is a nice feature that is often seen in reading apps.
Posted in howto, programming, android

Using TinyMCE Content CSS with Rails Asset Pipeline

Recently, whilst building a small CMS system using TinyMCE and the tinymce-rails gem, I needed to inject some custom CSS so that the editor’s styles matched those of the site.
Posted in rails, howto, programming

Rails: Rendering Dynamic SVG Images in respond_to

SVG is a vector image described in XML. This post shows how to to render SVG images inline with Rails.
Posted in rails, howto, programming

Android: Consuming a Remote JSON API with Volley

In the previous tutorial, you learned how to use Volley’s built-in networking tools to quickly download a network resource and display the results. Volley removes lots of boiler-plate code, and lets you concentrate on the details of your app rather than dealing with low-level networking technologies.
Posted in howto, programming, android

Android: Getting Started with Volley

Volley is a library developed by Google for fast, easy networking in Android. It wraps up a lot of boiler plate code that you would normally have to code yourself when connecting to servers, queuing requests, handling errors, caching, etc.
Posted in howto, programming, android

Android: Using Gradle

On a couple of Android projects I’m working on, I’ve switched to using the new Gradle Build system. The idea of storing the entire build configuration in one place is great.
Posted in howto, programming, android

Android: Getting Started with Databases and ContentProviders Part 1

Clone the code from GitHub
Posted in howto, programming, android

Rails 3: Storing Model Metadata Attributes with ActiveRecord::Store

I recently discovered the excellent ActiveRecord store method whilst researching the best-practice for storing optional, flexible metadata against a record. store lets you keep simple key/value data into a single text column on your model.
Posted in programming, tips, activerecord