Skip to content

Instantly share code, notes, and snippets.

View maletor's full-sized avatar

Ellis Berner maletor

View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
store: Ember.inject.service(),
personsYouMayKnow: [],
willRender: function() {
this.get('store').findAll('persons_you_may_know').then((users) => {
this.set('personsYouMayKnow', users);
});
}
@maletor
maletor / README.md
Last active August 31, 2016 02:34
Ember.js learning resources

Ember.js

A general word of advice when learning Ember is be very speicfic with dates on the material and version numbers. The API changed rapidly from 1.0 to 2.0 and many concepts no longer apply (e.g. "Views" and "Controllers"). So again, 2.0+ is a must; turn back immediately if it does not specifiy 2.0. Also, do not expect to grasp Ember quickly just because you understand Rails, or React (though knowledge of components and DDAU is useful) or even JavaScript. It requires study like everything else. If you do not already know ES2015, don't worry, you'll learn as you go.

This is an imcomplete list, but I've ordered each category with the things I find the most valuable first.

Introduction

  1. http://fromrailstoember.com/
  2. http://emberigniter.com/new-to-ember-cli-start-here-2016-tutorial/
# 50-character subject line
#
# 72-character wrapped longer description. This should answer:
#
# * Why was this change necessary?
# * How does it address the problem?
# * Are there any side effects?
#
# Include a link to the ticket, if any.
diff --git a/app/components/completed-bugs.js b/app/components/completed-bugs.js
new file mode 100644
index 0000000..3a319a1
--- /dev/null
+++ b/app/components/completed-bugs.js
@@ -0,0 +1,21 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+ tagName: 'td',
@maletor
maletor / content-for-group.js
Created May 3, 2016 05:46 — forked from mrozema/content-for-group.js
Ember 2.0 compatible select box
import Ember from "ember";
export default Ember.Helper.helper(function([content, group, contentGroupKey]) {
return content.filterBy(contentGroupKey, group);
});
1) Error:
BugTest#test_after_save:
RuntimeError: self and other are not the same object
/Users/maletor/Desktop/test.rb:39:in `block in <class:Comment>'
/Users/maletor/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/rails-da1fecce32db/activesupport/lib/active_support/callbacks.rb:396:in `instance_exec'
/Users/maletor/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/rails-da1fecce32db/activesupport/lib/active_support/callbacks.rb:396:in `block in make_lambda'
/Users/maletor/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/rails-da1fecce32db/activesupport/lib/active_support/callbacks.rb:207:in `block in halting_and_conditional'
/Users/maletor/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/rails-da1fecce32db/activesupport/lib/active_support/callbacks.rb:456:in `block in call'
/Users/maletor/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/rails-da1fecce32db/activesupport/lib/active_support/callbacks.rb:456:in `each'
/Users/maletor/.rbenv/versions/2.3.
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
time = Time.zone.now
record.updated_at = time
record.save!
record.updated_at == time # this would fail because one was rounded
(byebug) Invite.where("send_at < ?", Time.zone.now + 72.hours).to_sql
"SELECT `invites`.* FROM `invites` WHERE (send_at < '2016-02-20 22:36:03.385389.385389')"
def each(&block)
results.each do |result|
member = block.call(result)
SkilledUser.new(member)
end
end