Skip to content

Instantly share code, notes, and snippets.

# frozen_string_literal: true
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

Keybase proof

I hereby claim:

  • I am zhubert on github.
  • I am zhubert (https://keybase.io/zhubert) on keybase.
  • I have a public key ASDNVFpTLY-wnxSH0SzBL1r9EwZ47yLq2f7m4BLYKvya7go

To claim this, I am signing this object:

class BatmanRailsDemo.PostsController extends Batman.Controller
routingKey: 'posts'
index: (params) ->
BatmanRailsDemo.Post.load (err) -> throw err if err
@set 'posts', BatmanRailsDemo.Post.get('all')
@set 'post', new BatmanRailsDemo.Post()
show: (params) ->
@set 'post', BatmanRailsDemo.Post.find parseInt(params.id, 10), (err) ->
@zhubert
zhubert / comment.js.coffee
Created May 3, 2012 17:25
Ember Associations
App.Comment = DS.Model.extend(
body: DS.attr("string")
post: DS.belongsTo('App.Post')
validate: ->
if @get("body") is `undefined` or @get("body") is ""
"Comments require a body."
)