r/ruby • • 10h ago

Blog post Can You Remove DatabaseCleaner?

Thumbnail
go.fastruby.io
0 Upvotes

r/ruby • • 15h ago

Merging Relations: Use merge to share scopes in Rails

Post image
11 Upvotes

I wrote a post about using ActiveRecord::Relation#merge to share scopes across models in Rails.

The example shows how duplicating a query can lead to inconsistent behaviour, and how extracting the rule into a named scope avoids that.

https://pushfromkush.com/publications/merging-relations-scopes-in-rails


r/ruby • • 13h ago

Show /r/ruby I built a Rails 8 gem where a model + policy gives you a tenant-scoped REST API. Looking for feedback on the permission design

Thumbnail
0 Upvotes

r/ruby • • 5h ago

tmux.rb - write your tmux configuration in a more readable ruby DSL!

Thumbnail
7 Upvotes