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 was archived by the owner on Dec 12, 2021. It is now read-only.
Hello,
This is a suggestion, I don't know how feasible it is...
The current implementation only checks if the parameters present in params hash are authorized, not if those are actually changing the model. If you supply along parameters that do not change the model, Cancan will not authorize the update.
It might be too 'deep' for Cancan to go and check if only the authorized attributes are dirty but it will simplify the views because with the current implementation, you need to put a lot of 'if can?' to be sure you are not supplying unauthorized params for the current role.
Basically, it would be great if we could supply the same form for all roles and Cancan checks authorized attributes change on their dirtiness.