aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Nogueira Neves <github@arthurnn.com>2015-12-13 13:14:55 -0500
committerArthur Nogueira Neves <github@arthurnn.com>2015-12-13 13:14:55 -0500
commit72c62421d7f9e2d1a87be5eb65616d85827b6e84 (patch)
treef70f24f6b97160ee5c560bee929796da5b1a5417
parenta94d4045103ecbeb890822477a07ca84512340d8 (diff)
parentc8350949d91614a1f8143cc776a9864ac98e45c4 (diff)
downloadrails-72c62421d7f9e2d1a87be5eb65616d85827b6e84.tar.gz
rails-72c62421d7f9e2d1a87be5eb65616d85827b6e84.tar.bz2
rails-72c62421d7f9e2d1a87be5eb65616d85827b6e84.zip
Merge pull request #22572 from prathamesh-sonpatki/fix-paintit-method-in-guides
Fix paintIt method in JavaScript guides [ci skip]
-rw-r--r--guides/source/working_with_javascript_in_rails.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/working_with_javascript_in_rails.md b/guides/source/working_with_javascript_in_rails.md
index 1c42ff2914..48fc6bc9c0 100644
--- a/guides/source/working_with_javascript_in_rails.md
+++ b/guides/source/working_with_javascript_in_rails.md
@@ -81,7 +81,7 @@ Awkward, right? We could pull the function definition out of the click handler,
and turn it into CoffeeScript:
```coffeescript
-paintIt = (element, backgroundColor, textColor) ->
+@paintIt = (element, backgroundColor, textColor) ->
element.style.backgroundColor = backgroundColor
if textColor?
element.style.color = textColor
@@ -107,7 +107,7 @@ attribute to our link, and then bind a handler to the click event of every link
that has that attribute:
```coffeescript
-paintIt = (element, backgroundColor, textColor) ->
+@paintIt = (element, backgroundColor, textColor) ->
element.style.backgroundColor = backgroundColor
if textColor?
element.style.color = textColor