News
Extending Ruby classes - Include, extend and prepend explained
Without the modules, you would have to rely on inheritance to organize your code and make it more reusable. Such an approach is far from being universal and a proper choice in every situation. Thanks to modules, we can extend classes more appropri...
Remote Ruby | Building a Business on Rails with Mike Perham
It’s been a crazy week of weather in Jason, Chris, and Andrew’s hometowns, but thankfully we have a great guest to take away the winter blues. Today, we have Mike Perham from Sidekiq and Faktory fame. We find out what Sidekiq is and a great story ...
My Ruby on Rails stack for side projects in 2021 - Magnus Skog
Why would you start a new side project in Ruby on Rails in 2021? Shouldn't you use something like Next.js or even Blitz? Well, I find that Ruby on Rails is still one of the most productive ways to create an application. It is safe and boring and i...
Rails 6.1 adds ActiveRecord::FinderMethods 'sole' and 'find_sole_by' | BigBinary Blog
There were no methods defined to find and assert the presence of exactly one record at the same time.For example, we have a class Product with a price field and we want to find a single product that has a price of 100. For zero or multiple product...
Active Record queries in views: when it's bad, when it's fine - Code with Jason
Maybe you’ve heard the advice that you shouldn’t put Active Record queries (or other logic) in views, but you’re not sure exactly why, other than “separation of concerns”. Why exactly is separation of concerns good?The rationale behind this advice...