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
| 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 |
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
| 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'); |
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
| 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; |
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
| 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 = {}; |
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
| 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')); |
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
| 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) |
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
| 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'); |
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
| # 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 |
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
| def index(options={}, &block) | |
| respond_with(*(with_chain(collection) << options), &block) | |
| end |