Skip to content

Commit

Permalink
Revert "Fixes deprecation warnings for Rails 7.0 in specs"
Browse files Browse the repository at this point in the history
This reverts commit fcac1ce.
  • Loading branch information
cflipse committed Oct 26, 2023
1 parent 4510ee3 commit efb1243
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rom/rails/active_record/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def initialize(env: ::Rails.env, root: ::Rails.root, configurations: ::ActiveRec
#
# @api private
def call
specs = { default: build(default_configuration.configuration_hash) }
specs = { default: build(default_configuration.symbolize_keys) }

if rails6?
configurations.configs_for(env_name: env).each do |config|
specs[config.name.to_sym] = build(config.configuration_hash)
specs[config.spec_name.to_sym] = build(config.config.symbolize_keys)
end
end

Expand All @@ -50,7 +50,7 @@ def call

def default_configuration
if rails6?
configurations.configs_for(env_name: env).first
configurations.default_hash(env)
else
configurations.fetch(env)
end
Expand Down

0 comments on commit efb1243

Please sign in to comment.