Skip to content

Commit

Permalink
Avoid require_dependency if Zeitwerk is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Oct 30, 2019
1 parent ab50ad0 commit 75eb8c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/letter_opener_web/letters_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

require_dependency 'letter_opener_web/application_controller'
unless Rails.respond_to?(:autoloaders) && Rails.autoloaders.zeitwerk_enabled?
require_dependency 'letter_opener_web/application_controller'
end

module LetterOpenerWeb
class LettersController < ApplicationController
Expand Down

0 comments on commit 75eb8c8

Please sign in to comment.