Using form_with vs form_for vs form_tag

Prior to Rails 5.1, Rails provided 2 form helpers, form_for and form_tag. You use form_for with a model and form_tag for custom URLs. Both generate HTML for a form. There are only a few minor differences so Rails 5.1 combined the two. You should now be using form_with.

Read More

Tutorial on how to use Active Storage on Rails 5.2

Active Storage. This tutorial includes the actual code you can use to try out this feature.

Read More

Rails Encrypted Credentials on Rails 5.2

Rails 5.1 introduced encrypted secrets, which gives you two places to put your secrets -- secrets. yml and secrets.yml.enc. This causes a bit of confusion on when you should use normal secrets or encrypted secrets.

Read More

Encrypted Configuration on Rails 5.2

Credentials is a new feature on Rails 5.2 which replaces secrets and encrypted secrets. Under the hood Credentials use EncryptedConfiguration which you can reuse if you need to use encryption on other parts of your application.

Read More

PostgreSQL Replication Tutorial For Disaster Recovery

This blog post is a step by step tutorial on how to set up PostgreSQL Replication between AWS regions. This is an essential part of our disaster recovery plan at Engine Yard. A previous blog post gives a higher level overview on disaster recovery.

Read More

Disaster Recovery Plan for Rails Apps

This is part of a series on preparing your Rails application for Black Friday. This disaster recovery plan is useful for sites that need to recover quickly when an entire AWS region goes down.

Read More

Load Testing Ruby Apps for Black Friday

 

Is your website ready for Black Friday traffic? Rails is capable of serving a huge amount of traffic. This is already proven. To make sure your Rails application is ready, you should perform load testing and add more servers if needed.

Read More

Dependency Management Guidelines for Rails Teams

I recently encountered a discussion in a developer chatroom about how to find good ruby gems to use for projects, and how to choose between them.

The (currently-defunct, hopefully only temporarily) website ruby-toolbox.com was mentioned, as well as awesome-ruby.com, and some conversation ensued about how to properly choose between similar dependencies for a given software requirement and why it's important.

Read More

Improving Rails App Performance with Database Refactoring & Caching

Performance is a huge priority for any developer. However, people often don’t worry about performance until it starts to dip and there’s an immediate cause for concern. Performance needs to be something we focus on up front—not just when the walls come tumbling down. It needs to be part of the process, not something that’s reviewed occasionally.

In this post, we’ll consider a few things you can do to improve performance, starting with the database.

Read More
Subscribe to our Blog