This file contains 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
# This won't be live if bars is a hasMany relationship | |
foo.get 'bars' | |
# Instead do this and use the patch below to get a live array: | |
hasManyHack foo, 'bars' | |
# workaround for https://github.com/emberjs/data/issues/1308 - | |
# once the SSOT branch is merged this should be able to be replaced |
This file contains 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 'nokogiri' | |
namespace :ember_cli_rails do | |
desc "compile ember and update application.html.erb with ENV vars" | |
task :build => [:ember, :update_env] do | |
end | |
desc 'Build ember app and copies css and js files to rails' |
This file contains 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
module.exports = (grunt) -> | |
timestamp = Date.now().toString() | |
grunt.initConfig | |
env: grunt.file.readJSON '.env.json' | |
s3: | |
options: | |
key: '<%= env.AWS.AccessKeyId %>' | |
secret: '<%= env.AWS.SecretKey %>' |
This file contains 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
class ApplicationController < ActionController::Base | |
protect_from_forgery with: :exception | |
def index | |
render text: index_html | |
end | |
private | |
def index_html |
This file contains 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
var Toggler = require('./toggler'); | |
var React = require('react/addons'); | |
var assert = chai.assert; | |
var Simulate = React.addons.TestUtils.Simulate | |
describe('Toggler', function(){ | |
var toggler, el; | |
beforeEach(function() { |
This file contains 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 'uri' | |
hostname = "(?:(?:[\\w\\-]+\\.)+[[:alpha:]]{2,})" | |
host = "(?:#{hostname}|#{URI::DEFAULT_PARSER.pattern[:IPV4ADDR]}|#{URI::DEFAULT_PARSER.pattern[:IPV6ADDR]})" | |
server = "//(?:#{URI::DEFAULT_PARSER.pattern[:USERINFO]}@)?#{host}(?::\\d*)?" | |
absolute_path = "(?:#{URI::DEFAULT_PARSER.pattern[:ABS_PATH]})?" | |
query = URI::DEFAULT_PARSER.pattern[:QUERY] | |
http_uri_regex = Regexp.new("\\A(?:http|https):(?:#{server}#{absolute_path})(?:\\?(?:#{query}))?\\z", Regexp::EXTENDED, 'N') |
This file contains 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
var computed; | |
App.computed = {}; | |
computed = Ember.computed; | |
App.computed.sample = function(dependentKey) { | |
return (computed("" + dependentKey + ".@each", function() { | |
var items, length; | |
items = this.getWithDefault(dependentKey, Em.A([])); |
OlderNewer