All Articles

Legacy Rails: Silently Judging You

I had to come up with a clever title because this article is about legacy Rails opens a new window applications and I know that you might fall asleep by the third paragraph. Boooooring… You probably want to read about that new JavaScript framework that came out (I love that this sentence will always be true, it doesn’t matter when you read this)

If you have been working with Rails for a few years, you have seen your fair share of shiny new applications, well-maintained and poorly-maintained legacy applications. This post is about Legacy Rails applications

Read more of Legacy Rails: Silently Judging You opens a new window

Three Useful Data Migration Patterns for Rails

At OmbuLabs opens a new window , we are big fans of Ruby on Rails opens a new window and design patterns opens a new window , especially convention over configuration opens a new window ! The beauty of Rails is that you can inherit a legacy project and easily find the different layers of code in different directories.

When it comes to database migrations the policy of Rails is very clear. It’s all about altering the database structure with gradual migration files: “Migrations are a convenient way to alter your database schema over time in a consistent and easy way.” (source opens a new window )

But, what about data migrations? What’s the best way to write, maintain, and run migrations that alter the data in your production database?

In this article I will talk about three different patterns for writing and maintaining your data migrations:

  1. Data migrations in db/migrate
  2. Data migrations with a set of Rake tasks
  3. Data migrations with data_migrate
Read more of Three Useful Data Migration Patterns for Rails opens a new window

Notes from the Rails Performance Workshop

If you are interested in Ruby and Rails performance, you have definitely read articles by Nate Berkopec opens a new window from Speedshop opens a new window . At Ombu Labs we are big fans of his work, his Complete Guide to Rails Performance book opens a new window and Slack community.

When Nate announced a series of public workshops opens a new window I didn’t hesitate and signed up as quickly as possible. Here are my notes from my experience at the workshop on October 17th.

Read more of Notes from the Rails Performance Workshop opens a new window

ActiveRecord::Dirty 5.2 API Changes

This article takes a look at some of the changes to the ActiveRecord::Dirty module between Rails 5.1 and 5.2.

If you’re running Rails 5.1, you may have already seen some of the deprecation warnings related to the API changes contained in it. Most of them are behavior changes, and there are some new additions as well.

To better understand these modifications, we’ll take a look at sample projects in Rails 5.1 and Rails 5.2.

Read more of ActiveRecord::Dirty 5.2 API Changes opens a new window