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

Feature: custom methods on associations. #423

Open kyku opened 3 years ago

kyku commented 3 years ago

Given the following code:

class Author < ApplicationRecord
   # ...
   has_many :posts do
        extend T::Sig
        sig { returns(Integer) } 
        def custom_method
          42
        end
   end
end

Could it be possible to export custom_method to generated RBI?