Using the Dentaku Gem to Manage Business Policies Outside of Your Codebase

I was reading The Pragmatic Programmer recently, and was struck by something I hadn’t considered before.

Be sure not to confuse requirements that are fixed, inviolate laws with those that are merely policies that might change with a new management...

Read more…

Posted March 10, 2017 at 10:10 pm

Client Collaboration

Professional web design is always collaborative. Even if you are the sole designer or developer on a project, you are in collaboration with your client. What you create together will always be constrained in some ways by your client, as it will also...

Read more…

Posted March 8, 2017 at 2:13 am

Making Static Sites Dynamic...Somewhat

I’m kind of in love with static site generators (Middleman in particular). For marketing and informational sites that don’t change very often, I get many of the benefits of my normal Rails framework development and deployment toolset, with a simpler...

Read more…

Posted February 24, 2017 at 8:53 pm

A Reusable SJR Approach in Rails

I was recently working on a Rails client project where certain pages needed to display various record types and each collection of records needed to be listed on the page, and needed to be editable in-place. So for example, let’s say a company had...

Read more…

Posted February 22, 2017 at 2:29 am

Managing Redirects in Middleman

If you need to maintain redirects for old pages in a Middleman site, you can do so by adding something like this to your config file:

redirect "/my/old-page.html", to: "/my/new-page/"

If you’ve only got a few redirects, this isn’t too bad. But if...

Read more…

Posted February 14, 2017 at 6:55 pm

Table of Contents Helper for Markdown in Middleman

For pages on your site with a lot of content, it can be nice to have sidebar navigation with a Table of Contents for the page. If you’re using Middleman with Markdown content, here’s a way you can do that.

1. Use the redcarpet gem to render Markdown...

Read more…

Posted February 8, 2017 at 3:31 pm

Exploitation and nurture in the digital industry

In The Unsettling of America, Wendell Berry writes:

The exploiter is a specialist, an expert; the nurturer is not. The standard of the exploiter is efficiency; the standard of the nurturer is care. The exploiter’s goal is money, profit; the nurturer...

Read more…

Posted January 25, 2017 at 2:09 am

DRYing up Nginx configurations

I have a web server that hosts quite a few Middleman sites via Nginx. Since the sites are very similar, their Nginx configuration is largely the same. I recently moved common configurations into a separate include file, which has made it easier to...

Read more…

Posted January 16, 2017 at 10:08 pm

Poor man’s inbound email processing in Rails with the Mail gem and Gmail

Most Rails developers seem to be using transactional email services to handle their inbound email processing needs these days. See services like Postmark, SendGrid, and Mandrill, which can all send webhook requests to your application whenever an email...

Read more…

Posted January 13, 2017 at 8:41 pm

Custom currency input for Simple Form

Today, I was moving a standard Rails form to Simple Form and realized that one of the form inputs is actually a Bootstrap input group, with an add-on at the beginning of the input field with the proper currency symbol.

Tumblr inline nz3yoxz8ji1qz7n3m 540

There’s no built-in way to...

Read more…

Posted December 9, 2015 at 3:49 pm