As a rule, access control will be performed both on the client and on the server. On the server you can use authorize! in their controllers according to normal. On the client, cancan is unavailable.
Possible solutions:
- Rendering view fragments on a server, where
can? available. I do not think this approach is very important with the spine. - Open API for "cancan requests"
- Duplicate your ability object on the client
I lean over the lines, exposing the API, but if the network becomes a performance issue, I think you will have to duplicate your object object on the client side.
This seems like a good example of how client-side applications work more!
source share