What is Ruby doing on Rails?
Hello, you're reading Infinum Ruby Drops, bringing you the latest Ruby and Rails related news straight to your inbox every week.
How to store large JSON in PostgreSQL with Rails Attributes API
If you store large objects in the database (such as JSON), for example, data for big reports, then this can take up a lot of space. To reduce the size of data, you can compress and store it in binary form.
Read More
Rails
rails notes is used to search your code in a Rails application to find comments beginning with specific keywords.
A lot of times, we ask user for sensitive data such as password, credit card number etc. We should not be able to see this information in logs or the console.
Ruby
There are multiple vulnerabilities about Cross-Site Scripting (XSS) in jQuery shipped with RDoc which bundled in Ruby. All Ruby users are recommended to update Ruby to the latest release which includes the fixed version of RDoc.
The operator ** is useful as an options hash.


Beyond Ruby
"Given that we’re halfway through an app w/o an architecture that TDD’s well, should we start TDD now or wait for the next greenfield chance to do it right?"
Although logs are powerful and flexible, their sheer volume often makes it impractical to extract insight from them. Relevant information is spread across many individual log lines so searching for the right details can be slow and requires intricate query syntax.
Blast from the past
"If you can’t build a well-structured monolith, what makes you think you can build a well-structured set of microservices?"

||= is so simple to write that often you don't give much thought to it. I'm guilty of this as well.
Gem of the week
A bundler plugin to find known memory leaks in your dependencies.