1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[Brightbox] Fixes Compute#account to pass service

When called out of a collection, the `connection` is passed into new
models. When created themselves models do not have link back to the
service instance (Fog::Compute::Brightbox::Real) causing some actions to
fail.
This commit is contained in:
Paul Thornthwaite 2012-11-20 11:24:10 +00:00
parent b346308613
commit 0cb518a3d2

View file

@ -215,7 +215,10 @@ module Fog
# @return [Fog::Compute::Brightbox::Account]
#
def account
Fog::Compute::Brightbox::Account.new(get_scoped_account)
Fog::Compute::Brightbox::Account.new(get_scoped_account).tap do |acc|
# Connection is more like the compute 'service'
acc.connection = self
end
end
# Returns true if authentication is being performed as a user