Skip to content

Commit

Permalink
use new_record? instead of new?
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Muller authored and Wesley Beary committed Jun 10, 2010
1 parent 7979363 commit 20eeba5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/fog/vcloud/terremark/ecloud/models/internet_service.rb
Expand Up @@ -30,20 +30,15 @@ def delete
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
Expand Down

0 comments on commit 20eeba5

Please sign in to comment.