Skip to content

Instantly share code, notes, and snippets.

View raven-chen's full-sized avatar
🏠
Working from home

Raven raven-chen

🏠
Working from home
View GitHub Profile
@raven-chen
raven-chen / Backbone_definition.js
Created May 28, 2012 03:22
Backbone presentation demo
var Flowers = Backbone.Collection.extend({
url: "/posts"
})
var flowers = new Flowers;
var Plant = Backbone.Model.extend({
defaults: {
name: "rose",
intro: "I can't walk"
},
@raven-chen
raven-chen / gist:fc5669ecda5f8b62e2fa
Last active August 29, 2015 14:22
Reproduce call save in `getter` method bug in rails 4.2
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@raven-chen
raven-chen / gist:32dd180a5937f75b999d
Created June 19, 2015 07:14
Default response header
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'