Skip to content

Update README to change reserved word 'yield' #50

Merged
merged 1 commit into from Jun 26, 2012
+2 −2
View
4 README.md
@@ -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
Something went wrong with that request. Please try again.