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
| // Add this file: app/controllers/object.js – Done. | |
| // Ember.ObjectController will be removed in Ember 2.0 and auto-generated ObjectControllers | |
| // cause deprecation warning since Ember 1.11. | |
| // This file is here so ember does not generate ObjectControllers anymore. | |
| // See https://github.com/emberjs/ember.js/blob/06e41ad7ccd28558dd4e651aa070bc06f7757821/packages/ember-routing/lib/system/generate_controller.js#L11-L26 | |
| import Ember from 'ember'; | |
| export default Ember.Controller; |
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
| // adapters/application.js | |
| var ApplicationAdapter = DS.Adapter.extend({ | |
| init: function() { | |
| this.hoodie = window.hoodie; // FIXME? | |
| this._super(); | |
| }, | |
| find: function(store, type, id) { | |
| return this.hoodie.store.find(type.typeKey, 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
| // Usage: | |
| // HoodieAdapter.create({type: "mystuff", url: "some/url"}) | |
| // "type" is required. "url" is optional. | |
| var hoodie, | |
| get = Ember.get, | |
| Promise = Ember.RSVP.Promise; | |
| function mustImplement(message) { | |
| var fn = function() { |
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
| !!! | |
| /[if IE 8] <html class="ie-lt10 ie8" lang="de"> | |
| /[if IE 9] <html class="lt-lt10 ie9" lang="de"> | |
| :plain | |
| <!--[if gt IE 9]><!--><html lang="de"><!--<![endif]--> | |
| %head | |
| %body | |
| :plain |
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
| de: | |
| errors: | |
| messages: | |
| expired: "ist abgelaufen, bitte fordern Sie es neu an" | |
| not_found: "nicht gefunden" | |
| already_confirmed: "wurde bereits aktiviert, bitte versuchen Sie sich anzumelden." | |
| not_locked: "ist nicht gesperrt" | |
| not_saved: | |
| one: "Ein Fehler hat verhindert, dass %{resource} gespeichert werden konnte:" | |
| other: "%{count} Fehler haben verhindert, dass %{resource} gespeichert werden konnte:" |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>globes oculaires</title> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript" charset="utf-8" ></script> | |
| <script src="https://raw.github.com/paulca/eyeballs.js/refactor/eyeballs.js" type="text/javascript" charset="utf-8" ></script> | |
| <script src="https://raw.github.com/paulca/eyeballs.js/refactor/eyeballs.jquery.js" type="text/javascript" charset="utf-8" ></script> | |
| </head> |
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
| .bundle | |
| db/*.sqlite3 | |
| log/*.log | |
| tmp/**/* |
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
| # Example of how you can to use Capybara with plain Rails' integration tests and FactoryGirl (or plain MyModel.create…) | |
| require 'test_helper' | |
| require 'capybara' | |
| require 'capybara/dsl' | |
| require 'database_cleaner' | |
| Capybara.app = Pardy::Application | |
| Capybara.default_driver = :rack_test | |
| DatabaseCleaner.strategy = :truncation |
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
| /* small demo for handlebars.js, jQuery, require.js */ | |
| /*global Handlebars */ | |
| var cart = { | |
| products: [ | |
| ], | |
| total: function() { | |
| var sum = 0; | |
| for(var i in this.products) { | |
| sum += this.products[i].price; |