Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Jan 8, 2025
1 parent 77f986f commit 27001a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ruby_lsp/ruby_lsp_rails/addon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ def workspace_did_change_watched_files(changes)
@rails_runner_client.trigger_reload
end

# Asking the user to run a migration which has just been created may be overly-aggressive, but we _do_
# want to offer it after switching branchs. As a middle-ground, we only offer to run migrations if the
# migration was created more than a minute ago.
# It may be too agressive to ask a user to run a migration which has just been created.
# But do do want to offer for situations such as switching branches or pulling from a remote.
# As a middle-ground, we only offer to run migrations if the # migration was created more than a minute ago.
if changes.any? do |c|
%r{db/migrate/.*\.rb}.match?(c[:uri]) &&
c[:type] == Constant::FileChangeType::CREATED && !changed_in_last_minute?(c[:uri])
Expand Down

0 comments on commit 27001a1

Please sign in to comment.