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
| class BeersController < ApplicationController | |
| before_action :set_beer, only: [:show, :update, :destroy] | |
| # GET /beers | |
| def index | |
| @beers = Beer.all | |
| data = [] | |
| included = [] |
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
| // THE GOAL | |
| // Write $('ul').on('click', 'a', fn); in JavaScript | |
| // Must support old IE (so no Selectors API (matchesSelector) or anything) | |
| // Can you shorten this? | |
| var addEvent = (window.addEventListener ? | |
| function (el, ev, fn) { | |
| el.addEventListener(ev, fn, false); | |
| } : | |
| function (el, ev, fn) { |
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
| // We prepare some modules we'll need | |
| var sys = require("sys"), | |
| http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs"); | |
| var config = Array(); | |
| config['run_as'] = 'kingdutch'; | |
NewerOlder