News
The defined? keyword in Ruby. An overview of the defined? keyword…
Here, we can see that defined? handles a maximum of cases. But some cases are more relevant than others. For example, let’s see how the resolv-replace library — available in the Ruby Standard Library — takes advantage of this keyword to handle a r...
Tracking All Paper Trail Version From A Single Request With Correlation UUIDs
If you’ve ever had a need to implement an audit log to track all the changes that get persisted for all or at least some models in your application, there is a good chance that you’ve encountered PaperTrail gem that makes it trivial to track all t...
Under Deconstruction: The State of Shopify’s Monolith
Ruby on Rails is a great framework for rapidly building beautiful web applications that users and developers love. But if an application is successful, there’s usually continued investment, resulting in additional features and increased overall sy...
ActiveModel validation for email. Including MX lookup and disposable email blacklist
Validate emails with the help of the mail gem instead of some clunky regexp. Aditionally validate that the domain has a MX record. Optionally validate against a static list of disposable email services. Optionally validate that the email is not su...
The difference between let, let! and instance variables in RSpec - Code with Jason
First, there’s the stylistic difference. The syntax is of course a little different between the two approaches. Instance variables are of course prefixed with @. Some people might prefer one syntax over the other. I personally find the let syntax ...
Rails 6 adds support to persist timezones of Active Job
This blog is part of our Rails 6 series. Rails 6.0 was recently released.When a job is enqueued in Rails 6 using Active Job, the current timezone of a job is preserved and then this preserved timezone is restored when the job is finished executing...