This file contains hidden or 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
// /src/app.js | |
// Import jQuery | |
import $ from 'jquery'; | |
import _ from 'underscore'; | |
import Task from './models/task'; | |
import TaskList from './collections/task_list'; | |
var taskData = [{ | |
title: "Create a model", |
This file contains hidden or 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
import Backbone from 'backbone'; | |
var Task = Backbone.Model.extend({ | |
defaults: { | |
title: '', | |
completed: false | |
}, | |
logStatus: function() { | |
console.log("Title: " + this.get("title")); | |
console.log("Completed: " + this.get("completed")); |
This file contains hidden or 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
// /src/app.js | |
// Load Foundation Files | |
import _settings from './css/_settings.scss'; | |
import foundation from './css/foundation.css'; | |
import css from './css/styles.css'; | |
// Import jQuery & underscore | |
import $ from 'jquery'; | |
import _ from 'underscore'; | |
import Task from './models/task'; |
This file contains hidden or 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
// /src/app.js | |
// Import jQuery | |
import $ from 'jquery'; | |
import _ from 'underscore'; | |
import Task from './models/task'; | |
import TaskList from './collections/task_list'; | |
var taskData = [{ | |
title: "Create a model", |
This file contains hidden or 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
import Backbone from 'backbone'; | |
var Task = Backbone.Model.extend({ | |
defaults: { | |
title: '', | |
completed: false | |
}, | |
logStatus: function() { | |
console.log("Title: " + this.get("title")); | |
console.log("Completed: " + this.get("completed")); |
This file contains hidden or 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
// /src/app.js | |
// Import jQuery | |
import $ from 'jquery'; | |
import _ from 'underscore'; | |
import Task from './models/task'; | |
var my_task = new Task({ | |
title: "Create a model", | |
completed: true |
This file contains hidden or 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
# Gems we've talked about in class, but which have absolutely nothing to do | |
# with setting up spec-style testing. | |
# Included here for convenience. | |
gem_group :development do | |
# Improve the error message you get in the browser | |
gem 'better_errors' | |
# Use pry for rails console | |
gem 'pry-rails' | |
end |
This file contains hidden or 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
# sample_code.rb from POOD Ch 3 | |
# Starter 1 - Heaviliy dependent Gear class | |
class Gear | |
attr_reader :chainring, :cog, :rim, :tire | |
def initialize(chainring, cog, rim, tire) | |
@chainring = chainring | |
@cog = cog | |
@rim = rim |
This file contains hidden or 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
// spec/player_spec.js | |
import Player from 'player'; | |
describe('Player', function() { | |
var player; | |
beforeEach(function() { | |
player = new Player({ | |
name: "bob" |
This file contains hidden or 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
// player.js | |
import Scrabble from 'scrabble'; | |
import Backbone from 'backbone'; | |
const Player = Backbone.Model.extend({ | |
defaults: { | |
}, | |
initialize: function(options) { | |
this.name = options.name; |