Skip to content

Instantly share code, notes, and snippets.

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
<!DOCTYPE html>
<html>
<head>
<title>Case</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>
Case.Router.map(function() {
this.resource('inventory', function(){
this.route('review');
this.route('sheets');
this.resource('vehicle', { path: '/vehicle/:vehicle_id' }, function(){
this.route('choose', { path: '/:vehicle_id' });
this.route('details');
this.route('consignor');
this.route('additional');
this.route('price');
Case.Router.map(function() {
this.resource('inventory', function(){
this.route('review');
this.route('sheets');
this.resource('vehicle', { path: '/vehicle/:vehicle_id' }, function(){
this.route('details');
this.route('consignor');
this.route('additional');
this.route('price');
this.route('dmv');
@pzuraq
pzuraq / bmc
Created February 21, 2013 10:04
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts
server {
listen 80; ## listen for ipv4
Ember.Application.initializer({
name: "showrooms",
initialize: function(container, application) {
var showroomModel = container.lookup('model:Showroom');
container.optionsForType('showroom', { instantiate: false, singleton: true });
container.register('showroom', 'current', showroomModel.find());
}
});
{{view Ember.Select
prompt="Select one..."
contentBinding="controller.makes"
optionValuePath="content.id"
optionLabelPath="content.name"
valueBinding="controller.content.make.id"
class="span12"}}
Ember.Application.initializer({
name: "showrooms",
initialize: function(container, application) {
container.optionsForType('showroom', { instantiate: false, singleton: true });
container.register('showroom', 'current', Case.Showroom.find());
}
});
Ember.Application.initializer({
name: "injectShowrooms",
// *** WHY DOES THIS FILE EXIST ***
//
// For some godawful reason, ember-data's StateManager was written in a closure
// and I can't figure out a way to extend it, which is terrible because I really
// needed to. So, I copied over most of the closure here and reinstantiated
// the states var, which meant I needed a whole bunch of other stuff from the
// closure, and then I reopened DS.StateManager and set states to the new,
// modified states var. Replace this asap, please.
(function() {