#rails
Decrypt Rails Credentials in Go
EveryPost’s backend uses a Go API and a Rails application. This post discusses how to decrypt and read Rails credentials from Go to simplify shared configuration.
Writing Structured Logs in Rails
Going beyond lograge, we walk through how to generate structured logs for other logging needs.
We’ll walk through the configuration and code needed to make this happen and bridge the gap between simple request logging and richer application event logs.
Encrypted Attributes & RSpec
Rails 7 introduced support for application-level encryption, and here I’ll show how to write an RSpec test to ensure an attribute is encrypted, as well as explore some parts of ActiveRecord’s encryption API.
Custom Ordering of Tag Search Results using Trigrams, ActiveRecord and Postgres
This is a demo of how to order search results in ActiveRecord using the ActsAsTaggable gem combined with a ‘fuzzy’ search via Postgres’ built-in trigram support.
Implementing an Interactive Demo
Brief walkthrough of implementing “demo mode” in Mezzi, and how it limits access to ActionCable for anonymous users.
Logging Remote IP in Rails
Wondering why your Rails logs are reporting the wrong Remote IP on your hosted cloud platform? This explains trusted proxies and how to configure Rails the right way.