This article is part of the series Wandering in CRubyRead more
Ruby is a beautiful language and you probably know how to use it well, but do you know how it works? Let's dive into the Ruby MRI source code and find out how it really works.Read more
I used to believe that after_commit callbacks are not executed within RSpec tests when
config.use_transactional_fixtures is set to
true. Well, I was wrong. Here's why.
Database transactions are an essential tool to master. Because ActiveRecord's transactions behavior is not intuitive (especially when it comes to nested transactions), this article explains how to use them and what pitfalls you should pay attention to.Read more
Let's see how to write a recursive SQL query with PostgreSQL's CTE (Common Table Expressions) and ActiveRecordRead more
If you never really understood how joins work, or if you're somewhat familiar with
.joins but hardly grasp what
.left_outer_joins does, this is the blog post you need.
It is not common to run a Rails application in development mode locally over SSL. This article explains how to do that.Read more
This blog post summarizes my thoughts after reading one of David Brady's blog posts. It gives me the opportunity to talk about something that bothers me often during peer reviews: the dogmatic lack of parenthesis.Read more
Step-by-step tutorial on how to enable and use UUID primary keys in your Rails applicationRead more
A collegue shared this code snippet that helps making sure your database/models changes don't break your seeds.Read more
ransack is a 4.9k star gem that provides out-of-the-box search tools for your Ruby on Rails application. Let's find out how it can be hijacked to hack an app and extract data or steal users accounts.
app/is in a singular form (
paramsto behave kind of like a Hash.
I suggest we delegate
select_tagso that is doesn't change
Allow ActiveStorage to generate variants of BMP images.
This PR adds the following three hooks that were missing in Active Support Instrumentation guide:
This PR adds to
SourceAnnotationExtractor::Annotationa new method
register_tagsfollowing the example of
register_directories. It does not change the behavior of
rake notesand allows tags registration through configuration.