Skip to content

Commit

Permalink
moved the destroy connection to destroyAtPath so destroy can be chang…
Browse files Browse the repository at this point in the history
…ed easier
  • Loading branch information
James Burka committed Oct 22, 2008
1 parent 2004f9d commit 97a2e6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/lib/ActiveResource+Base.m
Expand Up @@ -128,6 +128,10 @@ - (BOOL)createAtPath:(NSString *)path {
}
}

- (BOOL)destroyAtPath:(NSString *) path {
return [[Connection delete:path withUser:[[self class] getUser] andPassword:[[self class] getPassword]] isSuccess];
}

- (BOOL)create {
return [self createAtPath:[self collectionPath]];
}
Expand All @@ -139,7 +143,7 @@ - (BOOL)createWithParameters:(NSDictionary *)parameters {
- (BOOL)destroy {
id myId = [self getId];
if (nil != myId) {
return [[Connection delete:[[self class] elementPath:myId] withUser:[[self class] getUser] andPassword:[[self class] getPassword]] isSuccess];
return [self destroyAtPath:[[self class] elementPath:myId]];
}
else {
return NO;
Expand Down
8 changes: 8 additions & 0 deletions active_resource.xcodeproj/project.pbxproj
Expand Up @@ -45,6 +45,8 @@
239D50CB0EA691DD00318802 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
239D50DA0EA6921800318802 /* DogTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D50D90EA6921800318802 /* DogTest.m */; };
239D50E70EA694F300318802 /* rails_boot_strap.rb in Resources */ = {isa = PBXBuildFile; fileRef = 239D50E60EA694F300318802 /* rails_boot_strap.rb */; };
239D75CD0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D75CC0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m */; };
239D75CE0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D75CC0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
350420F40E5E15AA00493366 /* DogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 350420F30E5E15AA00493366 /* DogViewController.m */; };
350421290E5E1A0F00493366 /* Dog.m in Sources */ = {isa = PBXBuildFile; fileRef = 350421280E5E1A0F00493366 /* Dog.m */; };
Expand Down Expand Up @@ -93,6 +95,8 @@
239D50D80EA6921800318802 /* DogTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DogTest.h; sourceTree = "<group>"; };
239D50D90EA6921800318802 /* DogTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DogTest.m; sourceTree = "<group>"; };
239D50E60EA694F300318802 /* rails_boot_strap.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = rails_boot_strap.rb; sourceTree = "<group>"; };
239D75CB0EAF8D3700664953 /* ObjectiveResourceDateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectiveResourceDateFormatter.h; path = lib/ObjectiveResourceDateFormatter.h; sourceTree = "<group>"; };
239D75CC0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ObjectiveResourceDateFormatter.m; path = lib/ObjectiveResourceDateFormatter.m; sourceTree = "<group>"; };
28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* active_resource_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = active_resource_Prefix.pch; sourceTree = "<group>"; };
Expand Down Expand Up @@ -325,6 +329,8 @@
357A914B0E9A436E0025D9AF /* XML */ = {
isa = PBXGroup;
children = (
239D75CB0EAF8D3700664953 /* ObjectiveResourceDateFormatter.h */,
239D75CC0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m */,
357A91580E9A436E0025D9AF /* Delegates */,
357A91B10E9A55EF0025D9AF /* XMLSerializable.h */,
357A91B20E9A55EF0025D9AF /* XMLSerializableSupport.h */,
Expand Down Expand Up @@ -497,6 +503,7 @@
23829E0C0EA393700070F0BF /* EditDogViewController.m in Sources */,
23829F010EA39B3B0070F0BF /* ViewDogController.m in Sources */,
3506000D0EA7FCCA0085CBDF /* NSData+Additions.m in Sources */,
239D75CD0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -532,6 +539,7 @@
239D50010EA690E600318802 /* GTMIPhoneUnitTestDelegate.m in Sources */,
239D50020EA690E600318802 /* GTMIPhoneUnitTestMain.m in Sources */,
239D50DA0EA6921800318802 /* DogTest.m in Sources */,
239D75CE0EAF8D3700664953 /* ObjectiveResourceDateFormatter.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down

0 comments on commit 97a2e6a

Please sign in to comment.