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

[DOC release] Expand Route#render options documentation #5135

Merged
merged 1 commit into from
Jul 11, 2014

Conversation

trek
Copy link
Member

@trek trek commented Jul 9, 2014

This also updates it to reflect the additional model param you can pass
(enabled since 33a9891)

@trek
Copy link
Member Author

trek commented Jul 9, 2014

Which came originally from #4477.

@rwjblue
Copy link
Member

rwjblue commented Jul 9, 2014

Would you mind marking as [DOC release]?

@trek trek changed the title [DOC] Expand Route#render options documentation [DOC release] Expand Route#render options documentation Jul 9, 2014
@trek
Copy link
Member Author

trek commented Jul 9, 2014

@rwjblue
Copy link
Member

rwjblue commented Jul 9, 2014

You are correct, the contributing guide should be updated to include the prefix listing.

Here is the listing along with a little bit of info on each in the following slides:

https://speakerdeck.com/rwjblue/contributing-to-ember?slide=41

// posts route
Ember.Route.extend({
renderTemplate: function(controller, model){
this.render('posts', { // the template to render, referenced by name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you supply a view in the options hash, isn't the template associated with that view used instead of the "string identifier" ('posts')?

I can vaguely recall that tripping me up in the past.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you specifically supply templateName to view, which is pretty old school for 1.0 which reversed the view/template relationship: http://emberjs.jsbin.com/yuqesulo/1/

That continues to work to not break older apps, but isn't mentioned much.

This also updates it to reflect the additional `model` param you can
pass (enabled since 33a9891)
rwjblue added a commit that referenced this pull request Jul 11, 2014
[DOC release] Expand Route#render options documentation
@rwjblue rwjblue merged commit 847634c into emberjs:master Jul 11, 2014
@rwjblue rwjblue deleted the expand-route-render-docs branch July 11, 2014 17:28
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

Successfully merging this pull request may close these issues.

3 participants