`geddy scaffold` breaks #259

Closed
mde opened this Issue Nov 9, 2012 · 4 comments

Projects

None yet

2 participants

@larzconwell larzconwell was assigned Nov 9, 2012
@mde
Collaborator
mde commented Nov 10, 2012

This happens when you just do geddy scaffold foo without any property definitions.

@larzconwell

Ah figured it out! It's because when you don't include properties it just returns an empty object as per 9d64a6c. The actual error occurs where we are calling for properties['default'] which doesn't exist obviously because it's empty.

@larzconwell

So I'm not sure what we could do, we could provide an empty default like {default: {name: '', type: ''}} and change the templates to ignore empty property info.

@mde
Collaborator
mde commented Nov 10, 2012

As long as it's possible to create empty models, it's all fine. :)

On Sat, Nov 10, 2012 at 9:29 AM, Larz Conwell notifications@github.comwrote:

So I'm not sure what we could do, we could provide an empty default like {default:
{name: '', type: ''}} and change the templates to ignore empty property
info.


Reply to this email directly or view it on GitHubhttps://github.com/mde/geddy/issues/259#issuecomment-10257487.

@larzconwell larzconwell added a commit that closed this issue Nov 10, 2012
@larzconwell larzconwell Closes #259, Fix error where no properties at all would throw when co…
…mpiling templates. Now if no default is given it will use the ID property, and when looping will only add the items template if it has content in it's name field
7609a49
@larzconwell larzconwell added a commit that referenced this issue Nov 10, 2012
@larzconwell larzconwell Closes #259, Fix error where no properties at all would throw when co…
…mpiling templates. Now if no default is given it will use the ID property, and when looping will only add the items template if it has content in it's name field

Conflicts:

	templates/Jakefile
515a929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment