Preventing read access to a model

In a model are there any methods that are called before providing
access to the model?

I’m exploring ways to enforce privileges in my app. Wondering if I can
define some sort of “before” method in the model to prevent read
access to the model unless certain conditions are true.



Go to read about ActiveRecord::Callbacks

See also restful_authentication gem and simple_access_control plugin -
use them both.