Skip to content

Commit

Permalink
Minor code tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
timriley committed Nov 1, 2024
1 parent 13d8cef commit a861c97
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/hanami/cli/generators/app/relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ def call(key:, namespace:, base_path:, gateway:)
schema_name = key.split(KEY_SEPARATOR).last
body_content = ["schema :#{schema_name}, infer: true"]

if gateway
gateway_name = gateway.split(KEY_SEPARATOR).last
body_content.unshift("gateway :#{gateway_name}")
end
body_content.prepend("gateway :#{gateway}") if gateway

RubyFileWriter.new(
fs: fs,
Expand Down

0 comments on commit a861c97

Please sign in to comment.