deleteObject:usingBlock:

60 views
Skip to first unread message

jsleeuw

unread,
Jun 1, 2012, 6:46:41 AM6/1/12
to res...@googlegroups.com
Really quick question here:

(Using 0.10.0) Should this not result in the local 'like' instance being removed from my Core Data cache? (I'm it's not) 

[[RKObjectManager sharedManager] deleteObject:like usingBlock:^(RKObjectLoader* loader) {

  loader.targetObject = like;

  loader.delegate = self;

}];



jsleeuw

unread,
Jun 3, 2012, 8:18:28 PM6/3/12
to res...@googlegroups.com
got this sorted out -- my api was returning a 204 status code (with no body). 
returning a blank body allowed the mapping result processing to happen in RKManagedObjectLoader. 

garyfoster

unread,
Jul 20, 2012, 9:41:15 PM7/20/12
to res...@googlegroups.com
Thank goodness I found this post.  For the next poor soul, in case they are using a Rails back end, I changed the following:

format.json { head :no_content }

to the following:

format.json { render json: {} }
Reply all
Reply to author
Forward
0 new messages