Sha256: c000688df4732e94abaaf123395e71b665133c427084b5ead590e257db5af9a3

Contents?: true

Size: 427 Bytes

Versions: 1

Compression:

Stored size: 427 Bytes

Contents

class Wallaby::ActiveRecord::ModelFinder < Wallaby::ModelFinder
  def all
    Rails.cache.fetch 'wallaby/active_record/model_finder' do
      ActiveRecord::Base.subclasses.reject do |model_class|
        model_class.abstract_class? ||
        model_class.to_s.start_with?('#<') ||
        model_class.name == 'ActiveRecord::SchemaMigration' ||
        model_class.name.index('HABTM')
      end.sort_by &:to_s
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wallaby-4.1.6 lib/adaptors/wallaby/active_record/model_finder.rb