radiegtya / meteoris2

a Realtime Javascript Boilerplate base on Meteor Js Framework
MIT License
246 stars 45 forks source link

mugen fails to filter out blank field, generates broken code #11

Closed ssteinerx closed 9 years ago

ssteinerx commented 9 years ago

When creating a new type, mugen automatically adds a blank field at the end of the form:

https://www.dropbox.com/s/tufm6qf4v4ksesv/Screenshot%202014-12-17%2016.55.26.png?dl=0

Pressing "Submit" at this point, leads to generation of improper code as the generator does not properly filter out the third, blank field. This causes the entire app to fail.

Touch a file, and the app restarts, then fails again, endlessly.

The only way out is to manually edit the generated "view.html" file for the new type and remove the broken code.

ssteinerx commented 9 years ago

Update: the broken code goes far beyond this. This really renders the tool almost completely unusable as the number of places that the "null" field ends up spans all generated code.

ssteinerx commented 9 years ago

Even worse that that. If there's even an underscore in the table name, mugen adds a "-" in the middle, completely breaking all generated code requiring manual removal to get the server running at all.

radiegtya commented 9 years ago

Cool, I'll try to fix this when I have time

radiegtya commented 9 years ago

Already fixed, please check the latest meteoris version. Thanks

ssteinerx commented 9 years ago

Pressing "add field" creates a blank entry which is still not filtered out when "Generate" is pressed requiring the user to manually go back and remove the blank entry before generating. It doesn't generate bad code any more, but is unnecessarily cumbersome.