-
-
Notifications
You must be signed in to change notification settings - Fork 576
No validation in generators #870
Comments
The same for |
Here's a pastebin https://pastebin.com/E2rk93DS |
A BIG +1 for this feature What I read is that by default Buffalo passes everything he doesn t understand to the underlying database (it is a documented behavior, feature not a bug :) ) Then you start to make your own rules of thumbs, it seems that uint doesn t work, that putting some uppercase letter doesn t work sometimes, that sometimes having "_" doesn t work ... (which I am sure all have good reasons) I see two things that could work (as @kamilgregorczyk proposed):
This is a usefull feature for
|
@kamilgregorczyk From the pastebin, line 15 references two files:
Do those files exist as named? The commas in the filenames are causing the errors that begin on line 16. |
Yes, these we created by buffalo g r name body |
I would suggest deleting those files and any references to them. While it looks like the filesystems involved are ok with the name, filenames containing commas are against common conventions and will cause untold problems for you going forward. After a little digging, it looks like an update of your buffalo code will solve the issue. Pastebin of my test run here: https://pastebin.com/tbAiPmWJ Note the version number on line 11: v4.2.2, where your pastebin is using v3.51.1 , also line 11. Delete those files containing commas in the name. Update buffalo with the following:
And try your generates again. There have been several fixes and improvements in the code since the version you are using. |
Should be fixed since gobuffalo/pop#231 |
I just did
buffalo g r name,body
and it generated wrong files, it would be good to have 1. Validation 2. A confirm check if we really want to create/roll back it it there were some errors.The text was updated successfully, but these errors were encountered: