<!-- app/views/project_roles/_form.html.erb --> | |
<div class="projectRole"> | |
<%= form.label :name %> | |
<%= form.text_field :name %> | |
<!-- etc etc etc --> | |
<!-- the JS down below relies on the following two lines being next to each other --> | |
<%= form.hidden_field '_destroy' unless form.object.new_record? %> | |
<a href="#" class="removeNestedItem">Delete</a> |
module BabyTalk | |
class Engine < Rails::Engine | |
config.to_prepare do | |
User.class_eval do | |
has_many :participations, :foreign_key => "participant_id" | |
has_many :rooms, :through => :participations | |
end | |
end | |
end | |
end |
- Bytes and Blobs by David Flanagan
- Conference Wifi Redux by Malte Ubi
- Sashimi - https://github.com/cramforce/Sashimi
- Run Your JS everywhere with Jellyfish by Adam Christian - http://jelly.io Project
- Fighting Crime and Kicking Apps with Batman.js by Nick Small
- Hello Jo by Dave Balmer - Project - http://joapp.com
I want... | |
Steamed crabs! | |
Obrycki's | |
Walk east on Pratt Street for about half a mile | |
1727 E Pratt St, Baltimore, MD 21231 | |
http://www.yelp.com/biz/obryckis-crab-house-and-seafood-restaurant-baltimore | |
http://www.obryckis.com/ |
# I don't necessarily love CoffeeScript as a template for ES.next, but here is an example | |
# of metaprogramming via a combination of: | |
# * "this" bound to the currently created class in class definitions | |
# * class methods inherited | |
class Foo | |
this.hasMany = (types) -> | |
this.prototype[types] = -> | |
alert "Looking up #{types}" |
Objects are the most basic structure in JavaScript. Everything is an object: functions, arrays, numbers, strings, booleans, you-name-it. And yet we have no classes. That is, despite being an Object Oriented language, JavaScript does not use a separated layer of meta-data just to define how all these objects need to be constructed.
In fact, they are just collections of key/value
pairs, that define
their own behaviour. Thus, an object with properties foo = 1
and
// All navigation that is relative should be passed through the navigate | |
// method, to be processed by the router. If the link has a `data-bypass` | |
// attribute, bypass the delegation completely. | |
$(document).on("click", "a[href]:not([data-bypass])", function(evt) { | |
// Get the absolute anchor href. | |
var href = { prop: $(this).prop("href"), attr: $(this).attr("href") }; | |
// Get the absolute root. | |
var root = location.protocol + "//" + location.host + Application.root; | |
// Ensure the root is part of the anchor href, meaning it's relative. |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.