11 Jul '12, 1am

Watching CoffeeScript Basics on RailsCasts via @railscasts

#267 CoffeeScript Basics May 23, 2011 | 11 minutes | Rails 3.1 CoffeeScript allows you to write JavaScript in a concise, elegant fashion. Here I convert JavaScript code to CoffeeScript in a Rails 3.1 app. Click to Play Video ▶ Tweet Download: source code Project Files in Zip (84 KB) mp4 Full Size H.264 Video (21 MB) m4v Smaller H.264 Video (12.2 MB) webm Full Size VP8 Video (14.2 MB) ogv Full Size Theora Video (33.9 MB) Show Notes ASCIIcast 54 Comments Similar Episodes Next Episode > < Previous Episode Browse Source Code Resources CoffeeScript CoffeeScript TextMate Bundle orders.js.coffee CreditCard = cleanNumber: (number) -> number.replace /[- ]/g, "" validNumber: (number) -> total = 0 number = @cleanNumber(number) for i in [(number.length-1)..0] n = +number[i] if (i+number.length) % 2 == 0 n = if n*2 > 9 then n*2 - 9 else n*2 total += n total % 10 == 0 jQuery -> $("#orde...

Full article: http://railscasts.com/episodes/267-coffeescript-basics

Tweets

Git Basics: Cleaning up excess branches

rubyflow.com 10 Jul '12, 5am

Git Basics: Cleaning up excess branches Posted by xfitzyx on July 10, 2012 — 0 comments Rails app repository getting out o...