Skip to content

Instantly share code, notes, and snippets.

Started GET "/" for 127.0.0.1 at 2013-04-11 01:07:05 -0700
Processing by HomeController#index as HTML
Rendered home/index.html.erb within layouts/application (0.0ms)
Completed 200 OK in 67ms (Views: 66.8ms | ActiveRecord: 0.0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-04-11 01:07:05 -0700
unselectedOptions: function() {
var options = this.content.get('vehicleOptions');
var filterOptions = this.get('VehicleOptions').filter(function(option) {
if(options.contains(option)) {
return false;
}
return true;
});
return filterOptions.sort(function(a,b){
return a.get('name') - b.get('name');
Case.UploadFileView = Ember.TextField.extend({
type: 'file',
attributeBindings: ['name', 'multiple'],
change: function(evt) {
var self = this;
var input = evt.target;
if (input.files && input.files[0]) {
for(var i = 0; i < input.files.length; ++i) {
var reader = new FileReader();
var that = this;
Case.RESTAdapter = DS.RESTAdapter.extend({
serializer: Case.RESTSerializer,
createRecord: function(store, type, record) {
if(type == 'Case.VehiclePhoto') {
this.createPhotoRecord(store, type, record);
} else {
var root = this.rootForType(type);
var data = {};
uploadFile: function(file) {
var self = this,
vehicle = this.get('controller.content'),
photo = Case.VehiclePhoto.createRecord();
console.log(file.data);
photo.set('name', file.name);
photo.set('imageData', file.data);
photo.set('vehicleId', this.get('controller.content.id'));
{{#each text in content.vehicleTexts}}
<div class="row-fluid">
{{view Bootstrap.Forms.Wysihtml5
valueBinding="text.text"
inputFieldClassNames="span12 text-description"
labelBinding="text.type.name"
}}
</div>
{{/each}}
Started GET "/a" for 127.0.0.1 at 2013-05-15 21:44:07 -0700
Processing by HomeController#index as HTML
Parameters: {"ember"=>"a"}
Rendered home/index.html.erb within layouts/application (0.0ms)
Compiled adapter.js (0ms) (pid 8216)
Compiled application.js (15ms) (pid 8216)
Completed 200 OK in 269ms (Views: 268.3ms | ActiveRecord: 0.0ms)
@pzuraq
pzuraq / router.js
Last active December 17, 2015 15:28
Case.Router.reopen({
location: 'history'
});
Case.Router.map(function() {
this.resource('inventory', function(){
this.route('review');
this.route('sheets');
this.resource('vehicle', { path: '/vehicle/:vehicle_id' }, function(){
this.route('index');
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
def index(options={}, &block)
respond_with(*(with_chain(collection) << options), &block)
end