Created
April 23, 2013 08:52
-
-
Save lefnire/5441907 to your computer and use it in GitHub Desktop.
Math.floor the view.fn "gold"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/app/helpers.coffee b/src/app/helpers.coffee | |
index e237c67..740261f 100644 | |
--- a/src/app/helpers.coffee | |
+++ b/src/app/helpers.coffee | |
@@ -102,15 +102,15 @@ viewHelpers = (view) -> | |
view.fn "gold", (num) -> | |
if num | |
- return (num).toFixed(1).split('.')[0] | |
+ Math.floor (num).toFixed(1).split('.')[0] | |
else | |
- return "0" | |
+ "0" | |
view.fn "silver", (num) -> | |
if num | |
- (num).toFixed(2).split('.')[1] | |
+ Math.floor (num).toFixed(2).split('.')[1] | |
else | |
- return "00" | |
+ "00" | |
### | |
Tasks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment