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

hash() translate? #131

Open
courajs opened this issue Nov 20, 2015 · 0 comments
Open

hash() translate? #131

courajs opened this issue Nov 20, 2015 · 0 comments

Comments

@courajs
Copy link
Contributor

courajs commented Nov 20, 2015

Right now hash() takes string arguments, and returns a hash of attribute keys -> attribute values.
It's sometimes useful to use different keys than the attribute key of the object. Would you be down for the ability to pass a hash argument instead? Like this:

Ember.Object.extend({
  thingType: 'dog',
  thingName: 'Fido',
  values: hash({
    type: 'thingType',
    name: 'thingName'
  }) // { type: 'dog', name: 'Fido' }
});
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

1 participant