Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate views as well as templates through Tilt #48

Closed
btelles opened this issue May 4, 2012 · 5 comments
Closed

Generate views as well as templates through Tilt #48

btelles opened this issue May 4, 2012 · 5 comments

Comments

@btelles
Copy link
Contributor

btelles commented May 4, 2012

I'm not sure I see the value of adding a separate 'view' file for each template file. Is anyone against auto-generating views based on templates and their file names?

Seems like this would fit well into the existing Tilt template right here:

https://github.com/btelles/ember-rails/blob/master/lib/ember/handlebars/template.rb#L19

If we get a few thumbs up, I'll go ahead and try to implement the feature.

@tchak
Copy link
Member

tchak commented May 4, 2012

The value of generating a view for a template is that you can actually add some custom helpers on it and other stuff...

@tchak
Copy link
Member

tchak commented May 4, 2012

If you vant to know, my opinion is that I don't see any value at all in generators... So I am not the best fitted person to answer. @patr1ck any input on this one?

@patr1ck
Copy link
Contributor

patr1ck commented May 4, 2012

We're adding generators in order to cut down on the amount of "now create this file with this boilerplate" type work. The ember+rails tutorial that we're writing for the new ember.js website will use these extensively.

I'm still a bit confused by what you're suggesting. The line of code you linked to seems to be related to the precompiling of handlebars template, so I'm not sure how it's relevant.

To be clear, the view generator I added creates both a view.js file and a template.handlebars file. There's no template-only generator, nor is there a template generator that creates a view. I would agree that that wouldn't make much sense, as templates don't imply a view.

@patr1ck
Copy link
Contributor

patr1ck commented May 4, 2012

Also, I'm still learning the various Ember.js internals, so I could very well just be totally misunderstanding what's going on here.

@tchak
Copy link
Member

tchak commented Jun 16, 2012

I relay do not see the point of this. If any new arguments - reopen.

@tchak tchak closed this as completed Jun 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants