Closed tobiashienzsch closed 5 years ago
Should be caused by this line:
The resource name is args[0]
and is also included in the attributes.
Changing the index to 1
should do it, but we could use some tests for the generated templates.
We have tests for the templates, what we lack is tests for CLI. A PR to add some of those would be awesome, and very much so welcome. :) On Jan 17, 2019, 4:36 AM -0500, Lukas Schlüter notifications@github.com, wrote:
Should be caused by this line: https://github.com/gobuffalo/buffalo/blob/3fb335f88cd9de1193c58598627848e362855a17/buffalo/cmd/generate/resource.go#L46 The resource name is args[0] and is also included in the attributes. Changing the index to 1 should do it, but we could use some tests for the generated templates. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@lukasschlueter @markbates
I could change the buggy line and make a PR, but I'm not sure if I'm able to create tests yet, still relatively new to GO.
A PR would be great. We need to come up with a good way of testing CLIs still. On Jan 17, 2019, 8:00 AM -0500, tobiashienzsch notifications@github.com, wrote:
@lukasschlueter @markbates I could change the buggy line and make a PR, but I'm not sure if I'm able to create tests yet, still relatively new to GO. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Description
I'm using the new beta. When generating a new resource with
buffalo generate resource product brand title variant:nulls.Text
the output of the html form is:Even though it shouldn't have the "Product" field. This issue also occurs when using different resource names, e.g. brand or stores
Steps to Reproduce the Problem
buffalo new testproject
buffalo pop create -a
buffalo generate resource product brand title variant:nulls.Text
buffalo pop migrate
Expected Behavior
Actual Behavior
See top
Info