Skip to content

Instantly share code, notes, and snippets.

Sean Rucker seanrucker

View GitHub Profile
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
edited: false,
actions: {
setText(text) {
this.set('edited', true);
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
edited: false,
actions: {
setText(text) {
console.log('setText', text);
@seanrucker
seanrucker / components.my-component.js
Last active May 9, 2016
Input Caret Position (solution)
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
edited: false,
actions: {
setText(text) {
this.set('edited', true);
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
setText(text) {
let message = this.get('message');
message = Ember.copy(message);
message.text = text;
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
focus() {
console.log('focus');
}
}
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
didRender() {
console.log('didRender');
console.log('pojo1', this.get('pojo1'));
console.log('pojo2', this.get('pojo2'));
}
});
@seanrucker
seanrucker / .tm_properties
Created Jul 29, 2015
TextMate 2 Properties for Ember project
View .tm_properties
extraExcludes = "bower_components,dist,hooks,node_modules,public,tests,tmp,vendor"
excludeInFileChooser = "{$excludeInFileChooser,$extraExcludes}"
excludeInFolderSearch = "{$excludeInFolderSearch,$extraExcludes}"
View Mobile API
## Create A Visit
`POST /visits`
````javascript
{
uuid: "ABC123",
majorNumber: "12984",
customer: {
customerID: "800000516109",
View _form.html.erb
<!-- app/views/inquiries/_form.html.erb
<%= form_for inquiry do |f| %>
<% if inquiry.errors.any? %>
<ul>
<% inquiry.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
<% end %>
View _form.html.erb
<!-- app/views/inquiries/_form.html.erb -->
<%= form_for inquiry do |f| %>
<div>
<%= f.label :name %><br/>
<%= f.text_field :name %>
</div>
<div>
<%= f.label :email %><br/>
You can’t perform that action at this time.