Closed rmosolgo closed 8 years ago
I would use an around_filter
:
def with_connection
CONNECTION_POOL.with do |conn|
@connection = conn
begin
yield
ensure
@connection = nil
end
end
end
fair 'nuf, I was about to say "In this case I can't use an around_action
", but then I realized I could, and it would make the API better anyways :)
(Real use case: https://github.com/reactjs/react-rails/pull/559)
Hi!
TL;DR, I'm wondering if this is fair game:
I see that
#checkout
and#checkin
are public methods, but I don't see them in the documentation, so I thought I would ask if that is proper usage. Does it seem ok?Thanks!