Skip to content

Instantly share code, notes, and snippets.

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());
}
});
@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
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');
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');
<h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>
<!DOCTYPE html>
<html>
<head>
<title>Case</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
// 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
LoadError: no such file to load -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
~/Websites/case/config/boot.rb:6
~/Websites/case/config/application.rb:1:in `require'
~/Websites/case/config/application.rb:1
~/Websites/case/config/environment.rb:2:in `require'
~/Websites/case/config/environment.rb:2
~/Websites/case/config.ru:3:in `require'
~/Websites/case/config.ru:3
/*global App*/
window.App = Ember.Application.create();
// Router
App.Router.map(function() {
this.resource('inventory', function(){
this.route('review');
this.resource('vehicle', { path: '/vehicle/:stock_no' }, function(){
App.InventoryController = Ember.ArrayController.extend({
content: App.Vehicle.all(),
active: function() {
return this.content.filterProperty('active', true);
}.property('[email protected]').cacheable()
});