|
|
|
|
|
by d3nj4l
2035 days ago
|
|
One of the challenges sorbet-rails faced [1] was with the usage of method_missing in certain places. The one that bit me was Rails automatically piping a class method from Model into the Model's CollectionProxy, effectively making class methods into scopes. We use this pretty extensively at work for complex scopes, so this is one of the reasons I've not been able to get complete buy-in for sorbet. Is that better in tapioca? (Also: Thank you for sorbet! It's the biggest reason I continue to use Ruby for my personal projects.) 1: https://github.com/chanzuckerberg/sorbet-rails/issues/104 |
|
This is indeed a problem in our codebase as well, and so far our team has been suggesting that people add shim (i.e. manual) RBI definitions for the methods that they find are missing from the types they've expected them on. This is a good stop-gap measure to solve a problem that is not very common with an easy solution to implement.