Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved Update into a UpdateAt function similar to CreatedAt

  • Loading branch information...
commit 7870f5adf8df01c13f553bf9f25d4f04a0a67d54 1 parent 97a2e6a
James Burka authored
View
2  .gitignore
@@ -15,5 +15,7 @@ sample_rails_app/log/*.log
sample_rails_app/tmp/**/*
sample_rails_app/doc/api
sample_rails_app/doc/app
+sample_rails_app/db/*.sqlite3
+
View
10 Classes/lib/ActiveResource+Base.m
@@ -128,6 +128,12 @@ - (BOOL)createAtPath:(NSString *)path {
}
}
+-(BOOL)updateAtPath:(NSString *)path {
+ return [[Connection put:[self toXMLElementExcluding:[NSArray arrayWithObject:[self classIdName]]]
+ to:path
+ withUser:[[self class] getUser] andPassword:[[self class] getPassword]] isSuccess];
+}
+
- (BOOL)destroyAtPath:(NSString *) path {
return [[Connection delete:path withUser:[[self class] getUser] andPassword:[[self class] getPassword]] isSuccess];
}
@@ -153,9 +159,7 @@ - (BOOL)destroy {
- (BOOL)update {
id myId = [self getId];
if (nil != myId) {
- return [[Connection put:[self toXMLElementExcluding:[NSArray arrayWithObject:[self classIdName]]]
- to:[[self class] elementPath:myId]
- withUser:[[self class] getUser] andPassword:[[self class] getPassword]] isSuccess];
+ return [self updateAtPath:[[self class] elementPath:myId]];
}
else {
return NO;
View
2  Classes/lib/ObjectiveResourceDateFormatter.m
@@ -11,7 +11,7 @@
@implementation ObjectiveResourceDateFormatter
-static NSString * dateFormatString = @"yyyy-MM-dd'T'HH:mm:ss'Z'";
+static NSString *dateFormatString = @"yyyy-MM-dd'T'HH:mm:ss'Z'";
+ (void)setFormatString:(NSString *)format {
dateFormatString = format;
Please sign in to comment.
Something went wrong with that request. Please try again.