Posts (Page 5)

Combining timecop and VCR during testing

Speed up your tests and make them more replayable.

Building internet safe addresses for ActionMailer using Mail::Address

Sometimes you need to pass in some funky characters to your mail parameters, use Mail::Address to do it safely.

Don't just [FILTER] passwords by default, filter tokens and keys!

Update your config.filter_parameters to have sensible defaults, so logs don't have sensitive information in them.

Where to buy your domains

Domain registrars is hard get right, here are the ones I like.

Removing Active Storage Routes from Rails 5.2

Active Storage is pretty cool, but it added new routes to my old rails apps.

Setting up Heroku release tasks for Ruby on Rails

Run migrations, clear caches and other things without downtime when deploying.

Using Decorators in Rails

Avoid adding if/else logic inside view, instead use Decorators.

Using I18n in Rails Validations

Don't hard code strings into your models, put them in your locales!

Stop resizing images with Ruby

Ruby shouldn't be used to resize images, instead do it in the cloud.

Waiting for Cloudinary uploads to finish with Rails UJS

How to nicely disable a form to let uploads finish before submitting to the server.