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

Find by view_name #36

Open
Zatvobor opened this issue Jul 31, 2013 · 1 comment
Open

Find by view_name #36

Zatvobor opened this issue Jul 31, 2013 · 1 comment

Comments

@Zatvobor
Copy link
Owner

In order to simplify fetching entities from views
We should provide simple convenience for that

for instance:

EmberApp.Task.find({type: "view", designDoc: 'tasks', viewName: "by_assignee", options: 'include_docs=true&key="%@"'.fmt(@get('email'))})

could be simplified as:

EmberApp.Task.view_by('tasks/by_assignee', key: @get('email'))

in additional:

EmberApp.Task.view('all')
# as equivalent for: EmberApp.Task.find_by_view('tasks/all')
@OpakAlex
Copy link
Contributor

use DS.Model.reopenClass

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