Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: ['value'],
input(e) {
let val = this.readDOMAttr('value');
/*
* this.attrs.update(val)
@Emerson
Emerson / has_relations.rb
Last active August 29, 2015 13:59 — forked from AlexJWayne/has_relations.rb
Rewritten as a Rails concern with updated syntax. Also added a relation_identifier and relation_position that gets dynamically attached to related objects.
module RelationExtensions
extend ActiveSupport::Concern
included do
# -- Constants ------------------------------------------------------------
# -- Attributes -----------------------------------------------------------
attr_accessor :relation_identifier, :relation_position
# -- AR Extensions --------------------------------------------------------