Though it's less than likely a resource would return with no "id" (or only
1 attribute), I think that it needs to be considered. It's rare to find
perfect CRUD.
Imagine that User.find(123) was actually
CoolViews.find("aggregateOfAllHotTopics"). I guess that the service could
supply an "id" of "aggregateOfAllHotTopics", but should that be mandatory?
What about searches? Will searches have an "id"? It's very likely that the
structure of the search won't be perfect CRUD / REST.
And just to point out, lack of "id" isn't the problem, the problem is that
there's only 1 attribute. Adding "id" fixes the problem, but also adding
any attribute fixes the problem.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-core/-/5TV3BI7cBzAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.