jeudi 22 août 2019

Scope of POROs in Rails

It seems like when using only class methods on a PORO like a Service in a Rails app and called by controllers, that there is only one instance of the Service object created across all requests.

I know Rails creates new instances of Controllers and Models per request, but haven't seen anything documented about how Rails treats your own POROs.

What's your understanding?

Aucun commentaire:

Enregistrer un commentaire