Skip to content

Commit

Permalink
Remove pre Rails 7.1 conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Jan 13, 2025
1 parent 07d60e7 commit 7390bd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
12 changes: 3 additions & 9 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,9 @@
# to make Rails upgrades easier.
# ----------------------------------------------------------------

if Rails.version < '7.1.0'
config.action_mailer.preview_path = Rails.root.join(
'spec', 'mailers', 'previews'
)
else
config.action_mailer.preview_paths = [
Rails.root.join('spec', 'mailers', 'previews')
]
end
config.action_mailer.preview_paths = [
Rails.root.join('spec', 'mailers', 'previews')
]

# Set LOG_LEVEL in the environment to a valid log level to temporarily run the
# application with a non-default setting.
Expand Down
6 changes: 1 addition & 5 deletions lib/no_constraint_disabling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ module ActiveRecord
class FixtureSet
def self.create_fixtures(fixtures_directory, fixture_set_names, class_names = {}, config = ActiveRecord::Base)
fixture_set_names = Array(fixture_set_names).map(&:to_s)
if Rails.version < '7.1.0'
class_names = ClassCache.new class_names, config
else
class_names.stringify_keys!
end
class_names.stringify_keys!

# FIXME: Apparently JK uses this.
connection = block_given? ? yield : ActiveRecord::Base.connection
Expand Down

0 comments on commit 7390bd4

Please sign in to comment.