Skip to content

Commit d45b076

Browse files
bivanalharcysjonathan
authored andcommitted
chore(setting): update settings
- run Dummy::Application instead of mere Rails - sprockets is no longer required in Rails 7, so assets config is removed - not raising transactional callbacks in current ActiveRecord version
1 parent 9008ef8 commit d45b076

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

spec/dummy/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
require File.expand_path('../config/application', __FILE__)
55

6-
Rails.application.load_tasks
6+
Dummy::Application.load_tasks

spec/dummy/config.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# This file is used by Rack-based servers to start the application.
22

33
require ::File.expand_path('../config/environment', __FILE__)
4-
run Rails.application
4+
run Dummy::Application

spec/dummy/config/application.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ class Application < Rails::Application
1919
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
2020
# config.i18n.default_locale = :de
2121

22-
# Do not swallow errors in after_commit/after_rollback callbacks. This only applies to Rails 4.2
23-
# and is deprecated in Rail 5.
24-
if ActiveRecord.version == Gem::Version.new('4.2.x')
25-
config.active_record.raise_in_transactional_callbacks = true
26-
end
27-
2822
config.after_initialize do
2923
require_relative '../db/schema'
3024
end

spec/dummy/config/environment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
require File.expand_path('../application', __FILE__)
33

44
# Initialize the Rails application.
5-
Rails.application.initialize!
5+
Dummy::Application.initialize!

spec/dummy/config/initializers/assets.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Be sure to restart your server when you modify this file.
22

33
# Version of your assets, change this if you want to expire all your assets.
4-
Rails.application.config.assets.version = '1.0'
4+
# Rails.application.config.assets.version = '1.0'
55

66
# Add additional assets to the asset load path
77
# Rails.application.config.assets.paths << Emoji.images_path

0 commit comments

Comments
 (0)