Last active
January 10, 2018 13:22
-
-
Save basz/84c64ffd3622f38d0f1268f4bbfbde7f to your computer and use it in GitHub Desktop.
BSForm Changeset Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Route from '@ember/routing/route'; | |
| import { inject as service } from '@ember/service'; | |
| export default Route.extend({ | |
| store: service(), | |
| model() { | |
| alert(1); | |
| return this.get('store').createRecord('dossier/dossier', {dossierNumber: '123'}); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import DS from 'ember-data'; | |
| import { buildValidations, validator } from 'ember-cp-validations'; | |
| const { Model, attr, hasMany } = DS; | |
| const Validations = buildValidations({ | |
| dossierNumber: { | |
| description: 'Dossier mumber', | |
| validators: [ | |
| validator('presence', true), | |
| validator('length', { | |
| min: 5, | |
| max: 15 | |
| }) | |
| ] | |
| }, | |
| }); | |
| export default Model.extend(Validations, { | |
| dossierNumber: attr('string'), | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.13.0", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "options": { | |
| "use_pods": true, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
| "ember": "2.16.2", | |
| "ember-template-compiler": "2.16.2", | |
| "ember-testing": "2.16.2", | |
| "ember-changeset": "1.4.2-beta.0", | |
| "bootstrap": "4.0.0-beta.3" | |
| }, | |
| "addons": { | |
| "ember-bootstrap-cp-validations": "1.0.0-alpha.0", | |
| "ember-bootstrap": "1.0.0", | |
| "ember-cp-validations": "3.5.1", | |
| "ember-changeset-cp-validations": "0.1.0", | |
| "ember-data": "2.16.3" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment