Skip to content
Snippets Groups Projects
Commit 815edcfc authored by Rory Jennings's avatar Rory Jennings
Browse files

fix: add a newline and an instantiator to generators

parent e54c007a
No related branches found
No related tags found
1 merge request!1fix: add a newline and an instantiator to generators
Pipeline #8360 failed
......@@ -22,7 +22,7 @@ module NexusCqrs
template('register_cqrs_handlers.rb', handler_config)
end
code_to_inject = "$COMMAND_EXECUTOR.register_command(#{full_name}, #{full_name}Handler)"
code_to_inject = "$COMMAND_EXECUTOR.register_command(#{full_name}, #{full_name}Handler.new)\n"
inject_into_file(handler_config, code_to_inject, after: "# Register Commands\n")
end
......
......@@ -22,7 +22,7 @@ module NexusCqrs
template('register_cqrs_handlers.rb', handler_config)
end
code_to_inject = "$QUERY_EXECUTOR.register_command(#{full_name}, #{full_name}Handler)"
code_to_inject = "$QUERY_EXECUTOR.register_command(#{full_name}, #{full_name}Handler.new)\n"
inject_into_file(handler_config, code_to_inject, after: "# Register Queries\n")
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment