mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
use new_record? instead of new?
This commit is contained in:
parent
7979363d37
commit
20eeba5f95
1 changed files with 1 additions and 6 deletions
|
@ -30,20 +30,15 @@ module Fog
|
|||
end
|
||||
|
||||
def save
|
||||
if new?
|
||||
if new_record?
|
||||
result = connection.add_internet_service( collection.href, _compose_service_data )
|
||||
self.href = result.body.href
|
||||
self.reload
|
||||
@new = false
|
||||
else
|
||||
connection.configure_internet_service( self.href, _compose_service_data, _compose_ip_data )
|
||||
end
|
||||
end
|
||||
|
||||
def new?
|
||||
@new ||= false
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def _compose_service_data
|
||||
|
|
Loading…
Add table
Reference in a new issue