[geddyjs.org] Bug in the tutorial #515

Closed
krizalys opened this Issue Dec 14, 2013 · 1 comment

Comments

Projects
None yet
2 participants

Hello,

There is a syntax error in one of the code snippets published on the geddyjs.org website.

The error is in the section http://geddyjs.org/tutorial#The%20ToDo-side%20of%20the%20association, second snippet, which currently reads:

<h3>Status: <%= toDo.status %></h3>

<h3>Steps</h3>
<% steps.forEach(function (step) { %>
<h4>
  <%- linkTo(step.title, {controller: 'steps', action: 'show', id: step.id}l); %>
</h4>
<% }); %>

Note the l (lowercase "L") at the end of the parameters passed to the linkTo() function. This character causes an error 500 while trying to visit http://localhost:4000/to_dos/:id

This line should be rewritten to something correct like:
<%- linkTo(step.title, {controller: 'steps', action: 'show', id: step.id}); %>

Thanks.

@mde mde added a commit that referenced this issue Dec 14, 2013

@mde mde Fixed Issue #515 typo in tutorial 97dd6fe
Contributor

mde commented Dec 14, 2013

Thanks for catching this. :) Fixed in 97dd6fe on the release branch.

For future reference, the tutorial is in the GitHub repo:

https://github.com/mde/geddy/blob/master/tutorial.md

Feel free to make improvements or corrections there. The Web site pulls from the release branch, so if you have fixes that should go up immediately, just give us a pull request for that branch.

Thanks again!

mde closed this Dec 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment