Skip to content

Commit

Permalink
Initialize @Translators hash earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Mar 15, 2024
1 parent a062160 commit 9c5f5fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/route_translator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ class TranslatorNotFound < BaseError; end

require 'route_translator/railtie' if defined?(::Rails::Railtie)

@translators = {}

def self.add_translator(engine, opts = {})
@translators ||= {}
@translators[engine] = Translator.new(engine, opts)
end

Expand Down

0 comments on commit 9c5f5fb

Please sign in to comment.