Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember 3.0 #481

Merged
merged 2 commits into from
May 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ember-model.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

var VERSION = '2.18.0';
var VERSION = '3.0.0-beta.1';

if (Ember.libraries) {
Ember.libraries.register('Ember Model', VERSION);
Expand Down Expand Up @@ -645,8 +645,7 @@ Ember.Model = Ember.Object.extend(Ember.Evented, {
var relationships = this.constructor._relationships || [], meta = Ember.meta(this), relationshipKey, relationship, relationshipMeta, relationshipData, relationshipType;
for (var i = 0, l = relationships.length; i < l; i++) {
relationshipKey = relationships[i];
relationship = (meta.descs || this)[relationshipKey];
relationshipMeta = relationship.meta();
relationshipMeta = this.constructor.metaForProperty(relationshipKey);

if (relationshipMeta.options.embedded) {
relationshipType = relationshipMeta.type;
Expand Down
16 changes: 3 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "no",
"license": "MIT",
"devDependencies": {
"ember-source": "2.18.2",
"ember-source": "3.0.0",
"glob": "~3.2.1",
"grunt": "~1.0.1",
"grunt-contrib-clean": "~0.4.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/ember-model/lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ Ember.Model = Ember.Object.extend(Ember.Evented, {
var relationships = this.constructor._relationships || [], meta = Ember.meta(this), relationshipKey, relationship, relationshipMeta, relationshipData, relationshipType;
for (var i = 0, l = relationships.length; i < l; i++) {
relationshipKey = relationships[i];
relationship = (meta.descs || this)[relationshipKey];
relationshipMeta = relationship.meta();
relationshipMeta = this.constructor.metaForProperty(relationshipKey);

if (relationshipMeta.options.embedded) {
relationshipType = relationshipMeta.type;
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-model/lib/version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var VERSION = '2.18.0';
var VERSION = '3.0.0-beta.1';

if (Ember.libraries) {
Ember.libraries.register('Ember Model', VERSION);
Expand Down
4 changes: 2 additions & 2 deletions packages/ember-model/tests/filtered_record_array_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ QUnit.test("must be created with a filterFunction property", function(assert) {

QUnit.test("must be created with a filterProperties property", function(assert) {
assert.throws(function() {
Ember.FilteredRecordArray.create({modelClass: Model, filterFunction: Ember.K});
Ember.FilteredRecordArray.create({modelClass: Model, filterFunction: function() {} });
}, /FilteredRecordArrays must be created with filterProperties/);
});

Expand All @@ -42,7 +42,7 @@ QUnit.test("with a noop filter will return all the loaded records", function(ass
Model.fetch().then(function() {
var recordArray = Ember.FilteredRecordArray.create({
modelClass: Model,
filterFunction: Ember.K,
filterFunction: function() { return true; },
filterProperties: []
});

Expand Down