Skip to content

Commit

Permalink
Don't call check_all_pending! for older Rails (#513)
Browse files Browse the repository at this point in the history
Don't call check_all_pending! for older Rails
  • Loading branch information
andyw8 authored Nov 6, 2024
1 parent a89f3a2 commit 33da705
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ruby_lsp/ruby_lsp_rails/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def active_record_model?(const)
end

def pending_migrations_message
return unless defined?(ActiveRecord)
# `check_all_pending!` is only available since Rails 7.1
return unless defined?(ActiveRecord) && ActiveRecord::Migration.respond_to?(:check_all_pending!)

ActiveRecord::Migration.check_all_pending!
nil
Expand Down

0 comments on commit 33da705

Please sign in to comment.