Our great sponsors
-
-
Similar gem here: https://github.com/makandra/edge_rider
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Your examples using joins would return duplicated Sections. That might force you to add a distinct. I personally find it wrong to do a distinct in a scope just to be able to make the condition I want the scope to do. It's a hidden side effect that could cause problem elsewhere and it's unexpected from the name of the scope. I made a gem to deal with that situation: where_assoc. There is definitely an overlap between both gem.
Related posts
- Best rails tools to automatically handle logging of things like all a user's actions, or changes to a record in a module - primarily for audit purposes.
- Uniqueness validation does not work since the beginning of Ruby on Rails.
- Database Views & Rails Active Record: defining new Model classes out of views
- Materialised views for serious performance gains
- How to implement user options