You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.
From a client POV is there a difference between remoted and associated? Can they be consolidated.
For example
GET /v1/posts/1/comments.json # associated
GET /v1/posts/1/top_comments.json # remoted (collection)
GET /v1/posts/1/statistics.json # remoted (single record)
We can detect if it's a collection vs. a single record. (Maybe ActiveResource already does?)
In fact, we could use has_many and has_one/belongs_to to implement remoted instance methods from the client-side
Add collection version of remote methods
Maybe remoted is only for class level methods? (how are they different from scopes?)
GET /v1/posts/by_popularity
We do have scopes and instance-level remote methods but there could be a case where a collection (class-level) based remote method would be useful.
This by_popularity method is a trivial example (tht could be a scope -- uh, from the client POV, why wouldn't it just be a scope?) but imagine a query that is much more computationally expensive across all Posts
The text was updated successfully, but these errors were encountered:
From a client POV is there a difference between remoted and associated? Can they be consolidated.
For example
We can detect if it's a collection vs. a single record. (Maybe ActiveResource already does?)
In fact, we could use
has_many
andhas_one
/belongs_to
to implement remoted instance methods from the client-sideAdd collection version of remote methods
Maybe remoted is only for class level methods? (how are they different from scopes?)
We do have scopes and instance-level remote methods but there could be a case where a collection (class-level) based remote method would be useful.
This
by_popularity
method is a trivial example (tht could be ascope
-- uh, from the client POV, why wouldn't it just be a scope?) but imagine a query that is much more computationally expensive across all PostsThe text was updated successfully, but these errors were encountered: