We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4214f71 commit 5abb19fCopy full SHA for 5abb19f
lib/matestack/ui/vue_js/components/form/form.rb
@@ -56,7 +56,7 @@ def vue_props
56
emit: ctx.emit,
57
delay: ctx.delay,
58
fields_for: ctx.fields_for,
59
- primary_key: context.for&.class&.primary_key
+ primary_key: for_object_primary_key
60
}
61
end
62
@@ -69,10 +69,13 @@ def for_option
69
@for_option ||= ctx.for
70
71
72
+ def for_object_primary_key
73
+ context.for&.class&.primary_key rescue nil
74
+ end
75
+
76
def form_method
77
@form_method ||= options.delete(:method)
78
-
79
80
81
0 commit comments