pocke / rbs_rails

Apache License 2.0
282 stars 33 forks source link

rbs_rails doesn't generate definitions for ActiveRecord DSLs within module #209

Open mtsmfm opened 2 years ago

mtsmfm commented 2 years ago

Let's say we have the following module Deletable:

module Deletable
  extend ActiveSupport::Concern

  included do
    enum deleted_reason: {
      not_deleted: 1,
      censored: 2,
      banned: 3,
    }

    scope :deleted, -> ()  { where.not(not_deleted: 1) }
  end
end

class User < ApplicationRecord
  include Deletable
end

class Blog < ApplicationRecord
  include Deletable
end

Currently rbs_rails doesn't generate methods like User#not_deleted? etc. Is it intentional?

wheee commented 1 year ago

It's been more than a year =(