Coder Social home page Coder Social logo

ember-data-fixture-adapter's People

Contributors

bmac avatar ember-tomster avatar fivetanley avatar kategengler avatar mixonic avatar odoe avatar pangratz avatar pgengler avatar rwjblue avatar stefanpenner avatar tomdale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-data-fixture-adapter's Issues

Can't find serializer for Ember-data 1.13.4

Error while processing route: todos serializer.get is not a function TypeError: serializer.get is not a function

Application Adapter:

import Adapter from 'ember-data-fixture-adapter';

export default Adapter.extend({
  shouldReloadRecord: function() {
    return true;
  },
  shouldReloadAll: function() {
    return true;
  }
});

Would it be a good idea to prepare `giftwrap` version?

We all know fixture-adapter no longer lives in Ember Data but in this repo.

https://github.com/emberjs/data/blob/master/CHANGELOG.md#breaking-changes

You can use it as an addon, or build it using Ember Giftwrap.

https://github.com/ef4/ember-giftwrap#how

  • It's a 7 step process
  • This is a work-in-progress
  • It's alpha quality
  • Then it would require some hosting / CDN

Why is this important / relevant? To allow demos and tutorials use Fixture Adapter as previously...

Installing help

Lately I am busy with the update to Ember 1.13, Ember Data 1.13 etc. As we use fixtures in our app, I tried this addon.

After I installed it with ember install ember-data-fixture-adapter the deprecation warning did not go away. Are there extra steps I am missing (adding a js to the ember-cli-build for example)?

No readme and yet doesnt work when upgrading ember-data

I use fixtures to represent models that have not been added to the DB yet so I can't use restAdapter.

Upgraded to latest ED and then fixtures stopped working. Installed this addon and still not working.

import DS from 'ember-data';

export default DS.FixtureAdapter;
TypeError: serializer.get is not a function
    at ember$data$lib$system$store$serializer$response$$normalizeResponseHelper (serializer-response.js:42)

For anyone using Fixtures and upgrading to latest ED it is a total blocker with no info on how to fix.

Need to wrap response

I'm using Ember and Ember Data both 2.15.0, and I needed to wrap the response of the FixtureAdapter methods in order for them to be recognised by the calling method (from the Ember Data Store?) and processed into real Ember.Models. Eg:

// app/adapters/post.js
import FixtureAdapter from 'ember-data-fixture-adapter';
export default FixtureAdapter.extend({
	simulateRemoteResponse: false,
	findAll: function(){
		return this._super.apply(this, arguments).then(function(response){
			return { posts: response };
		});
	}
});

I'm using a RESTSerializer, if that matters, but I can't see how.

Is this intentional? Or perhaps caused by changes to Ember Data?
I'm currently upgrading from Ember 1.13 to 2.15.
The exact same fixtures and models worked fine in 1.13 using the built-in DS.FixtureAdapter, without needing to wrap the responses.

ember-data-fixture-adapter & queryRecord

Hello. I use Ember : 2.2.0, Ember Data : 2.2.0 and ember-data-fixture-adapter last version.
I have a model with a large many entries. How do I withdraw one entries, recording by id =1.
If i use return this.store.queryRecord('video', { filter: { id: '1' } }).then(function(tomster) {

}); in my model, Console say -

Error while processing route: video Assertion Failed: You tried to make a query but your adapter does not implement queryRecord Error: Assertion Failed: You tried to make a query but your adapter does not implement queryRecord

If use return this.store.findAll('video'); All records without errors. But I need one! where id =1 =)

For examle, my files:
adapters/application.js
import DS from 'ember-data';
export { default } from 'ember-data-fixture-adapter';

models/video.js
import DS from 'ember-data';
var Video = DS.Model.extend({
title: DS.attr('string'),
num: DS.attr('string')
});
Video.reopenClass({
FIXTURES: [
{
id: 1,
num: '1',
title: "Something something Basecamp1"
},
{
id: 2,
num: '2',
title: "Something something Basecamp2"
}
]
});
export default Video;

routes/video.js

import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.queryRecord('video', { filter: { id: '1' } }).then(function(tomster) {
});
}
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.