chanzuckerberg / sorbet-rails

A set of tools to make the Sorbet typechecker work with Ruby on Rails seamlessly.
MIT License
638 stars 84 forks source link

Add `take` and `take!` relation methods #509

Closed ghiculescu closed 2 years ago

ghiculescu commented 2 years ago

ref: https://github.com/chanzuckerberg/sorbet-rails/pull/307

take was added a long time ago, https://github.com/rails/rails/pull/5153

I'd also like to add sole but it needs to only be added in Rails 7+ (https://github.com/rails/rails/pull/40768).

codecov[bot] commented 2 years ago

Codecov Report

Merging #509 (677f95f) into master (9d7973e) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #509   +/-   ##
=======================================
  Coverage   97.49%   97.49%           
=======================================
  Files         115      115           
  Lines        2952     2952           
=======================================
  Hits         2878     2878           
  Misses         74       74           
Impacted Files Coverage Δ
lib/sorbet-rails/active_record_rbi_formatter.rb 90.80% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9d7973e...677f95f. Read the comment docs.