Skip to content

Commit a91dddd

Browse files
committed
Properly build forms for detached entities as if they were proper entities
1 parent 0172b3b commit a91dddd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/typescript_react_command_form_generator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def command_generator
3535
def type_generators(type_declaration = inputs_type, initial = true)
3636
return @type_generators if defined?(@type_generators)
3737

38-
generators = if type_declaration.entity?
38+
generators = if type_declaration.detached_entity?
3939
# For now, we'll not bother with entity/model classes in the inputs.
4040
# This simplifies things a bit re: form generation and setting UI
4141
# inputs into the inputs value.
@@ -107,7 +107,7 @@ def non_colliding_inputs(type_declaration = inputs_type, result = [], path = [])
107107
type_declaration.attribute_declarations.each_pair do |attribute_name, attribute_declaration|
108108
non_colliding_inputs(attribute_declaration, result, [*path, attribute_name])
109109
end
110-
elsif type_declaration.entity?
110+
elsif type_declaration.detached_entity?
111111
# TODO: figure out how to not pass self here...
112112
result << FlattenedAttribute.new(self, path, type_declaration.to_type.primary_key_type)
113113
elsif type_declaration.model?

0 commit comments

Comments
 (0)