Skip to content

Commit

Permalink
Fix ActiveRecord::Base.connection.active? returning false in Rail…
Browse files Browse the repository at this point in the history
…s 8 as discussed in #1
  • Loading branch information
rameerez committed Oct 25, 2024
1 parent 7ea00ed commit 5f4ee4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Create a file `config/allgood.rb` in your Rails application. This is where you'l
# config/allgood.rb

check "We have an active database connection" do
make_sure ActiveRecord::Base.connection.connect! && ActiveRecord::Base.connection.active?
make_sure ActiveRecord::Base.connection.connect!.active?
end
```

Expand All @@ -63,7 +63,7 @@ Here's my default `config/allgood.rb` file that should work for most Rails appli
# config/allgood.rb

check "We have an active database connection" do
make_sure ActiveRecord::Base.connection.connect! && ActiveRecord::Base.connection.active?
make_sure ActiveRecord::Base.connection.connect!.active?
end

check "Database can perform a simple query" do
Expand Down
2 changes: 1 addition & 1 deletion examples/allgood.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check "We have an active database connection" do
make_sure ActiveRecord::Base.connection.connect! && ActiveRecord::Base.connection.active?
make_sure ActiveRecord::Base.connection.connect!.active?
end

check "The database can perform a simple query" do
Expand Down

0 comments on commit 5f4ee4b

Please sign in to comment.