Skip to content

Commit

Permalink
if dirs are set on the config object, do not override them in railsti…
Browse files Browse the repository at this point in the history
…e initializer
  • Loading branch information
Patrick Vice authored and skryukov committed Oct 28, 2024
1 parent 9339681 commit c1a24e9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/typelizer/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ class Railtie < Rails::Railtie

initializer "typelizer.configure" do
Typelizer.configure do |c|
c.dirs = [
Rails.root.join("app", "resources"),
Rails.root.join("app", "serializers")
]
if c.dirs.empty?
c.dirs = [
Rails.root.join("app", "resources"),
Rails.root.join("app", "serializers")
]
end
end
end

Expand Down

0 comments on commit c1a24e9

Please sign in to comment.