Skip to content

Commit

Permalink
Removed unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Dec 24, 2023
1 parent f16120b commit 3abb2d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 2 additions & 6 deletions lib/generators/ahoy/activerecord_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ def serialize_options
ActiveRecord::VERSION::STRING.to_f >= 7.1 ? "coder: JSON" : "JSON"
end

# use connection_config instead of connection.adapter
# use connection_db_config instead of connection.adapter
# so database connection isn't needed
def adapter
if ActiveRecord::VERSION::STRING.to_f >= 6.1
ActiveRecord::Base.connection_db_config.adapter.to_s
else
ActiveRecord::Base.connection_config[:adapter].to_s
end
ActiveRecord::Base.connection_db_config.adapter.to_s
end

def migration_version
Expand Down
3 changes: 0 additions & 3 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
Combustion.path = "test/internal"
Combustion.initialize!(*frameworks) do
if ENV["ADAPTER"] != "mongoid"
if ActiveRecord::VERSION::MAJOR < 6 && config.active_record.sqlite3.respond_to?(:represent_boolean_as_integer)
config.active_record.sqlite3.represent_boolean_as_integer = true
end
config.active_record.logger = logger
end

Expand Down

0 comments on commit 3abb2d6

Please sign in to comment.