Skip to main content

Posts (Page 3)

Patterns to avoid when using JSON columns in Rails

Rails supporting JSON field type is a great, but can screw you right over.

Rails 6 Sidekiq Queues

Rails 6 has new queues for ActiveStorage & ActionMailbox.

Testing Rails Action Mailbox with RSpec

Rails 6 ships with Action Mailbox, here is how I added tests for RSpec

Easier DateTime Localisation with Rails

Rails ships with a bunch ISO date formats (and a few localised ones), here is how to use them

Naming colours in SCSS

Naming is tricky, here is how I do it.

How to limit the size of Rails Logs

Rails log files growing to massive sizes? Limit them!

Configuring CORS on S3 for ActiveStorage

The AWS S3 CORS configuration to allow Direct Upload for ActiveStorage.

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.