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

TypeError: Object App.Person has no method 'get' #12

Closed
stefanluptak opened this issue Dec 26, 2011 · 1 comment
Closed

TypeError: Object App.Person has no method 'get' #12

stefanluptak opened this issue Dec 26, 2011 · 1 comment

Comments

@stefanluptak
Copy link

var App = Em.Application.create();

App.Person = DS.Model.extend();
App.Person.reopenClass({
    url: '/people?ids=%@'
});

App.serverAdapter = DS.Adapter.create({
    find: function(store, type, id) {
        var url = type.get('url');
        url = url.fmt(id);

        $.getJSON(url, function(data) {
           store.load(type, id, data); 
        });
    }
});

App.store = DS.Store.create({
    adapter: App.serverAdapter
});

App.store.find(App.Person, 1);

I wanted to give Ember.js-Data a try, but after executing the code above in Google Chrome console (with jQuery, Ember.js and Ember.js-Data included), this error message appears in console log: TypeError: Object App.Person has no method 'get'

I'm not sure If I am doing something wrong, but I used code snippets from the README.md file.

@tomdale
Copy link
Member

tomdale commented Dec 26, 2011

Sorry about that. It should be type.url. The documentation has been updated to reflect this.

@tomdale tomdale closed this as completed Dec 26, 2011
iamdtang referenced this issue in iamdtang/data Nov 6, 2019
# This is the 1st commit message:

WIP Tracerbench Travis setup

# This is the commit message #2:

dont checkin results

# This is the commit message #3:

configure azure job, make first thing for testing

# This is the commit message #4:

config updates

# This is the commit message #5:

Able to get results from Tracerbench

# This is the commit message #6:

redirect for tracerbench

# This is the commit message #7:

Update URLs to include ?tracerbench=true

# This is the commit message #8:

wip

# This is the commit message #9:

moves .server-replay.json to root

# This is the commit message #10:

wip

# This is the commit message #11:

cleanup

# This is the commit message #12:

cleanup

# This is the commit message #13:

cleanup

# This is the commit message #14:

cleanup

# This is the commit message #15:

change command

# This is the commit message #16:

Make process terminate with exit code 0

# This is the commit message #17:

Ignore tracerbench-results files

# This is the commit message #18:

Delete generated JSON file

# This is the commit message #19:

rename directory

# This is the commit message #20:

Bump ember-decorators-polyfill from 1.0.6 to 1.1.0

Bumps [ember-decorators-polyfill](https://github.com/pzuraq/ember-decorators-polyfill) from 1.0.6 to 1.1.0.
- [Release notes](https://github.com/pzuraq/ember-decorators-polyfill/releases)
- [Commits](ember-polyfills/ember-decorators-polyfill@1.0.6...1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
iamdtang referenced this issue in iamdtang/data Nov 6, 2019
# This is the 1st commit message:

WIP Tracerbench Travis setup

# This is the commit message #2:

dont checkin results

# This is the commit message #3:

configure azure job, make first thing for testing

# This is the commit message #4:

config updates

# This is the commit message #5:

Able to get results from Tracerbench

# This is the commit message #6:

redirect for tracerbench

# This is the commit message #7:

Update URLs to include ?tracerbench=true

# This is the commit message #8:

wip

# This is the commit message #9:

moves .server-replay.json to root

# This is the commit message #10:

wip

# This is the commit message #11:

cleanup

# This is the commit message #12:

cleanup

# This is the commit message #13:

cleanup

# This is the commit message #14:

cleanup

# This is the commit message #15:

change command

# This is the commit message #16:

Make process terminate with exit code 0

# This is the commit message #17:

Ignore tracerbench-results files

# This is the commit message #18:

Delete generated JSON file

# This is the commit message #19:

rename directory

# This is the commit message #20:

Bump ember-decorators-polyfill from 1.0.6 to 1.1.0

Bumps [ember-decorators-polyfill](https://github.com/pzuraq/ember-decorators-polyfill) from 1.0.6 to 1.1.0.
- [Release notes](https://github.com/pzuraq/ember-decorators-polyfill/releases)
- [Commits](ember-polyfills/ember-decorators-polyfill@1.0.6...1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #21:

Bump @ember/optional-features from 1.0.0 to 1.1.0

Bumps [@ember/optional-features](https://github.com/emberjs/ember-optional-features) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/emberjs/ember-optional-features/releases)
- [Changelog](https://github.com/emberjs/ember-optional-features/blob/master/CHANGELOG.md)
- [Commits](emberjs/ember-optional-features@v1.0.0...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #22:

[CHORE] fix Typo (emberjs#6635)

Happen to run into this typo. Been using Ember for years, love your work! Good luck!

Co-authored-by: igorT <terzicigor@gmail.com>
# This is the commit message #23:

Update Changelog for v3.13.0

# This is the commit message #24:

update changelog for v3.13.1

# This is the commit message #25:

[CHORE] adds infra for testing calls to Ember warn|deprecate|assert (emberjs#6626)

* [CHORE] adds infra for testing calls to Ember warn|deprecate|assert

* fix production tests

* address feedback

* feedback on labels

* remove id checks

# This is the commit message #26:

[CHORE] Refactor integration/multiple-stores-test.js in order to remove run loop usage (emberjs#6632)


# This is the commit message #27:

Bump ember-simple-tree from 0.7.0 to 0.7.1

Bumps [ember-simple-tree](https://github.com/btecu/ember-simple-tree) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/btecu/ember-simple-tree/releases)
- [Commits](btecu/ember-simple-tree@0.7.0...0.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #28:

Bump ember-decorators-polyfill from 1.1.0 to 1.1.1

Bumps [ember-decorators-polyfill](https://github.com/pzuraq/ember-decorators-polyfill) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/pzuraq/ember-decorators-polyfill/releases)
- [Commits](ember-polyfills/ember-decorators-polyfill@1.1.0...1.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #29:

cleanup serializer documentation (emberjs#6575)


# This is the commit message #30:

ISSUE-6012: test: added test for meta property and bug fix. (emberjs#6640)


# This is the commit message #31:

[FEAT links] ensures full links object support for relationships (emberjs#6606)

* [FEAT links] ensures full links object support for relationships

* fix lint

* add feature flags

# This is the commit message #32:

[BUGFIX release] Enable `store.createRecord` in FastBoot (emberjs#6568)

* Add FastBoot test for store.createRecord

Fails at the moment.

* Enable store.createRecord in FastBoot

Changes the V4 UUID generation to leverage `FastBoot.require` when
possible. This currently requires that the host application add the
following to their `package.json`:

```
"fastbootDependencies": [
  "crypto"
]
```

* fix types

# This is the commit message #33:

[CHORE] rename and restructure packages to clarify unpublished/private status

move unpublished packages into directories marked private

move published but private into better naming convention

move unpublished into better naming convention

change -build-infra imports to private-build-infra

larger re-org

# This is the commit message #34:

Bump eslint-config-prettier from 6.4.0 to 6.5.0

Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](prettier/eslint-config-prettier@v6.4.0...v6.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #35:

Bump eslint from 6.5.1 to 6.6.0

Bumps [eslint](https://github.com/eslint/eslint) from 6.5.1 to 6.6.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v6.5.1...v6.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #36:

[CHORE] refactor: Remove runloop usage in destroy module of integration/store… (emberjs#6646)

* refactor: Remove runloop usage in destroy module of integration/store-test

* fix linter errors

# This is the commit message #37:

Bump @types/ember__debug from 3.0.5 to 3.0.6 (emberjs#6647)

Bumps [@types/ember__debug](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__debug) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__debug)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #38:

Bump eslint-plugin-mocha from 6.2.0 to 6.2.1

Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md)
- [Commits](lo1tuma/eslint-plugin-mocha@6.2.0...6.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #39:

Bump qunit-dom from 0.9.0 to 0.9.1

Bumps [qunit-dom](https://github.com/simplabs/qunit-dom) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/simplabs/qunit-dom/releases)
- [Changelog](https://github.com/simplabs/qunit-dom/blob/master/CHANGELOG.md)
- [Commits](mainmatter/qunit-dom@v0.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #40:

Bump @typescript-eslint/parser from 2.5.0 to 2.6.0

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #41:

Bump @typescript-eslint/eslint-plugin from 2.5.0 to 2.6.0

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #42:

fix tracerbench command for renamed test app folder

# This is the commit message #43:

Setup har-remix

# This is the commit message #44:

replace server-replay with har-remix

# This is the commit message #45:

Use concurrently from node_modules instead of global installation

# This is the commit message #46:

wip

# This is the commit message #47:

Update bash script to use ember-data workspace for experiment

# This is the commit message #48:

relationship performance bash script updates

# This is the commit message #49:

removes line breaks

# This is the commit message #50:

removes .travis.yml from test app

# This is the commit message #51:

cleanup linting

# This is the commit message #52:

change eslint config

# This is the commit message #53:

cleanup

# This is the commit message #54:

remove comments

# This is the commit message #55:

updates azure-pipelines.yml

# This is the commit message #56:

adds tracerbench to github action workflow

# This is the commit message #57:

Update CI to install PM2 globally

# This is the commit message #58:

[CHORE] allow asserting all tests for deprecations (emberjs#6627)

* [CHORE] configure the ability to filter deprecations from assertNoDeprecations

* turn off helpers until tests are fixed

# This is the commit message #59:

[DOC] Close code block in the description
# This is the commit message #60:

Bump ember-qunit from 4.5.1 to 4.6.0

Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 4.5.1 to 4.6.0.
- [Release notes](https://github.com/emberjs/ember-qunit/releases)
- [Changelog](https://github.com/emberjs/ember-qunit/blob/master/CHANGELOG.md)
- [Commits](emberjs/ember-qunit@v4.5.1...v4.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #61:

Bump ember-fetch from 6.7.1 to 6.7.2

Bumps [ember-fetch](https://github.com/ember-cli/ember-fetch) from 6.7.1 to 6.7.2.
- [Release notes](https://github.com/ember-cli/ember-fetch/releases)
- [Changelog](https://github.com/ember-cli/ember-fetch/blob/v6.7.2/CHANGELOG.md)
- [Commits](ember-cli/ember-fetch@v6.7.1...v6.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #62:

Bump ember-load-initializers from 2.1.0 to 2.1.1

Bumps [ember-load-initializers](https://github.com/ember-cli/ember-load-initializers) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/ember-cli/ember-load-initializers/releases)
- [Changelog](https://github.com/ember-cli/ember-load-initializers/blob/master/CHANGELOG.md)
- [Commits](ember-cli/ember-load-initializers@v2.1.0...v2.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #63:

Bump ember-source from 3.13.3 to 3.14.1

Bumps [ember-source](https://github.com/emberjs/ember.js) from 3.13.3 to 3.14.1.
- [Release notes](https://github.com/emberjs/ember.js/releases)
- [Changelog](https://github.com/emberjs/ember.js/blob/master/CHANGELOG.md)
- [Commits](emberjs/ember.js@v3.13.3...v3.14.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# This is the commit message #64:

Bump eslint-plugin-ember from 7.2.0 to 7.3.0

Bumps [eslint-plugin-ember](https://github.com/ember-cli/eslint-plugin-ember) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/ember-cli/eslint-plugin-ember/releases)
- [Changelog](https://github.com/ember-cli/eslint-plugin-ember/blob/master/CHANGELOG.md)
- [Commits](ember-cli/eslint-plugin-ember@v7.2.0...v7.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants