This acts_as extension modifies ActiveRecord classes so they can carry a reference to the instance defined as current for the given request. The library is particularly useful for providing the authenticated user object to models.
Coroutine, John Dugan
gem "acts_as_current", "~> 1.0.0"