10 ms·
We included a spec in our rails app that inspects all AR models and errors if any don't specify any attr_accessible (with a whitelist of models to ignore). This
by zwily 15y ago
We included a spec in our rails app that inspects all AR models and errors if any don't specify any attr_accessible (with a whitelist of models to ignore). This catches anything included by plugins too, which can be helpful.
https://github.com/instructure/canvas-lms/blob/9b52a51b6a37efa5164f7f636dd8e7478dd0eb77/spec/models/general_model_spec.rb#L46 https://github.com/instructure/canvas-lms/blob/9b52a51b6a37e...