Maybe there's something in the initialization process that I missed, but sorbet-rails seems to having trouble generating methods for some of the default rails methods (e.g. has_many, belongs_to, validates, etc.). I can see that the corresponding generated association is generated, but I get type complaints that the main methods do not exist.
e.g. a class like this:
class Role < ApplicationRecord
has_and_belongs_to_many :users, :join_table => :users_roles
I can see the auto generated sigil in role.rbi
sig { returns(::User::ActiveRecord_Associations_CollectionProxy) }
def users; end
However this is the error I get when checking types:
Method has_and_belongs_to_many does not exist on T.class_of(Role) https://srb.help/7003
3 | has_and_belongs_to_many :users, :join_table => :users_roles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^