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
| Rails.application.config.to_prepare do | |
| SubscriptionPlan.class_eval do | |
| scope :active, where(:active => true) | |
| scope :by_price, order(:amount) | |
| end | |
| end |
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
| App.Router. = Ember.Router.extend({ | |
| index: Ember.Route.extend({ | |
| route: '/posts', | |
| connectOutlets: function(router) { | |
| router.get('applicationController').connectOutlet('posts', App.Post.find()); | |
| } | |
| }), | |
| show: Ember.Route.extend({ | |
| routes: '/posts/:post_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
| require "rubygems" | |
| require "nokogiri" | |
| class PlainTextExtractor < Nokogiri::XML::SAX::Document | |
| attr_reader :plaintext | |
| # Initialize the state of interest variable with false | |
| def initialize | |
| @interesting = false |
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
| "{ | |
| "data": "{\"user\":{\"first_name\":\"asd\",\"last_name\":\"testchangeName\",\"email\":\"as@asd.com\",\"username\":null,\"have_reached_age_of_majority\":false,\"favourite_category_id\":null}}", | |
| "context": { | |
| "serializer": { | |
| "mappings": { | |
| "keys": { | |
| "presenceSet": { | |
| "ember417": true, | |
| "ember418": true | |
| }, |
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
| (function() { | |
| window.DS = Ember.Namespace.create({ | |
| CURRENT_API_REVISION: 7 | |
| }); | |
| })(); | |
| (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
| (function() { | |
| var get = Ember.get, set = Ember.set; | |
| // This code initializes the IndexedDB database and defers Ember | |
| // readiness until it gets a reference to an IDBDatabase. | |
| Ember.onLoad('application', function(app) { | |
| app.deferReadiness(); | |
| var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB; |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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
| panayi@machine:~/dropbox/Development/contractor/witsbits/webapp (master)$ npm list | |
| npm WARN package.json fs-boot@0.0.9 'devDependences' should probably be 'devDependencies' | |
| app@0.0.0 /Users/panayi/Dropbox/Development/contractor/witsbits/webapp | |
| ├─┬ grunt@0.4.1 | |
| │ ├── async@0.1.22 | |
| │ ├── coffee-script@1.3.3 | |
| │ ├── colors@0.6.1 | |
| │ ├── dateformat@1.0.2-1.2.3 | |
| │ ├── eventemitter2@0.4.12 | |
| │ ├─┬ findup-sync@0.1.2 |
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> | |
| <head> | |
| <meta name="description" content="Continuous Redrawing of Views" /> | |
| <script src="http://code.jquery.com/jquery.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
| <script src="http://builds.emberjs.com/ember-latest.js"></script> | |
| <meta charset=utf-8 /> | |
| <title>Continuous Redrawing of Views</title> | |
| </head> |