Skip to content

Commit 5938273

Browse files
committed
Don't error if turbo-rails is required on an unsupported Rails version
1 parent e18bcf5 commit 5938273

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ GEM
308308
thor (1.3.1)
309309
tilt (2.4.0)
310310
timeout (0.4.1)
311+
turbo-rails (1.5.0)
312+
actionpack (>= 6.0.0)
313+
activejob (>= 6.0.0)
314+
railties (>= 6.0.0)
311315
tzinfo (2.0.6)
312316
concurrent-ruby (~> 1.0)
313317
unicode-display_width (2.5.0)
@@ -355,6 +359,7 @@ DEPENDENCIES
355359
slim (~> 5.1)
356360
sprockets-rails (~> 3.4.2)
357361
standard (~> 1)
362+
turbo-rails (~> 1)
358363
view_component!
359364
warning
360365
yard (~> 0.9.34)

test/sandbox/config/application.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
require "action_mailer/railtie"
88
require "action_view/railtie"
99
require "sprockets/railtie"
10+
begin
11+
require "turbo-rails"
12+
rescue LoadError
13+
raise if Rails::VERSION::MAJOR >= 6
14+
end
1015

1116
# Track when different Rails frameworks get loaded.
1217
# Ideally, none of them should be loaded until after initialization is complete.

0 commit comments

Comments
 (0)