Why is Devise "current_user" not available at model level?

There are many reports of Devise and the lack of availability of "current_user" for use in models. There are many works posted here and elsewhere. However, I did not find the answer to the “why” on any of the posts. Is this a security issue? If not, why?

+5
source share
1 answer

Since you do not have access to the session variable inside the model, this is not a development issue or something related to security. This is due to the MVC pattern used in Rails.

+16
source

All Articles