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

Add conversation mirage setup and remove un-needed mirage models #1652

Merged
merged 2 commits into from
Jan 10, 2018

Conversation

snewcomer
Copy link
Contributor

@snewcomer snewcomer commented Dec 24, 2017

Getting something showing in 4200 land.

Another note/question is if we want mirage to auto-detect the model, thus removing the need to define a mirage model (got in version 0.3.2 I think). Lmk if that is something you want me to remove if the mirage model isn't needed.

@@ -173,6 +173,7 @@ module.exports = function(environment) {
ENV['simple-auth'] = {
store: 'simple-auth-session-store:ephemeral'
};
ENV.SOCKETS_BASE_URL = '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add this between API/WEB?

return moment().subtract(i, 'days');
}
// author: belongsTo('user', { async: true }),
// conversation: belongsTo('conversation', { async: true })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove these two lines.

message: belongsTo(),
user: belongsTo(),
conversationParts: hasMany()
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miragejs/ember-cli-mirage#1056

So mirage can auto generate mirage models based off of the ember-data model, avoiding mismatches b/w the two.

Lmk what you think? We can keep slowly removing these as needed or all of them in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay thanks. Maybe open a separate issue so others are tracking that’s the case as a point of reference?

@snewcomer snewcomer force-pushed the mirage-conversation branch 2 times, most recently from 532d5b3 to f56e779 Compare December 27, 2017 21:52
Copy link
Contributor

@begedin begedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one ought to be safe to merge, since its a QOL PR

@joshsmith
Copy link
Contributor

@snewcomer want to squash and merge when you're ready?

@snewcomer snewcomer merged commit aec6750 into develop Jan 10, 2018
@snewcomer snewcomer deleted the mirage-conversation branch January 10, 2018 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants