Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
Merge pull request #50 from zungaphobia/master
Browse files Browse the repository at this point in the history
Update README to change reserved word 'yield'
  • Loading branch information
sstephenson committed Jun 26, 2012
2 parents 8a359fa + e43e9f7 commit 0d60edb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ value.

eco.render template,
project: { id: 1, name: "Mobile app" }
formFor: (project, yield) ->
formFor: (project, yield_to) ->
form =
textField: (attribute) =>
name = @escape attribute
value = @escape @project[attribute]
@safe "<input type='text' name='#{name}' value='#{value}'>"

url = "/projects/#{@project.id}"
body = yield form
body = yield_to form
@safe "<form action='#{url}' method='post'>#{body}</form>"

Note: In general, you should use CoffeeScript's fat arrow (`=>`) to
Expand Down

0 comments on commit 0d60edb

Please sign in to comment.