Annotate - Adding Table Columns to Model File Automatically

Adding table column comments to a model file can be a chore, especially making sure they’re kept up to date as your schema changes over time which is especially important since out of date information is worse than no information at all. This is wher

Read more

Generating a CSV file to export records in Rails

CSV (comma separated values) files are a great way to export a collection of records for importing into other systems or for analysis of data. Here we’ll be exporting the records for a table that has a single has_many relation.

Read more

The Pessimize Gem - Assigning a version to all gems in Gemfile

It’s always a good idea to assign versions to all you gems in your Gemfile. Personally I’d say it’s absolutely mandatory and not assigning at least a major version should throw an error, but that’s not up to me which is probably for the best.

Read more

Overriding to_s - Inserting a model directly into a view

<%= @foo %> => #<Foo:0x007fa874102948>
Read more

How to make your URLs pretty with friendly_id in Rails

Replacing record IDs in your URLs with the name of your record is incredibly useful for SEO purposes as well as making the links people share more descriptive and self-explanatory.

It’s also very easy using the friendly_id gem.

Read more

Adding Pagination to an ActiveResource Backed Controller

We’re going to add Pagination to an ActiveResource model using activeresource-response for handling ActiveResource response headers on the ActiveResource server side of things and kaminari for handling the pagination on both the API and ActiveRes

Read more

Setting CircleCI to compile SASS into CSS

I recently had to set up CircleCI to compile SASS into CSS for a Rails project and wanted to document how I went about it.

Read more

Adding functionality to a gem - Creating a gem from scratch Part 3

This is part three of a series on creating your own gem. This part will cover filling in the functionality of our gem and installing it.

Read more

Adding specs to a gem - Creating a gem from scratch Part 2

This is part two in a series on building a gem from scratch. In this part we'll be adding the specs for our gem's functionality.

Read more

Creating and installing a brand new gem - Creating a gem from scratch Part 1

This is the first in a series of posts where I build a basic gem using bundler and then post it to rubygems. Written as a way to keep all the details together for creating a gem whilst working on Faker-RPG.

Read more

Exporting CSV files in Rails

This article is an extension of the Railscast video on exporting data to a csv file, you can watch the video here

Read more
Thanks for subscribing!
Like what I'm doing? Subscribe and I'll let you know when I write new stuff.
Want to unsubscribe?