Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: f72b83a0a2
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (21 sloc) 0.657 kB

RailsCasts Episode #323: Backbone on Rails Part 1

Requires Ruby 1.9.2 or higher.

Commands used in episode

bundle rails new raffler rails g controller main index --skip-javascripts rails g backbone:install rails g backbone:scaffold entry rails g resource entry name winner:boolean --skip-javascripts rake db:migrate rake db:seed

JavaScript used in console

entries = new Raffler.Collections.Entries() entries.length entries.fetch() entry = entries.shuffle()[0] entry.get('name') entry.set({'winner': true}) entries.create({'name': 'Avdi Grimm'})

Jump to Line
Something went wrong with that request. Please try again.