Saturday 15 May 2010

afnetworking - How do I make AFIncrementalStore post data to Rails as objects? -


I have the iOS + Rails 3.1 app, and I'm using AFIncrementalStore for the client I am the server communication it is a kind of calendar app, and activity is the main model.

When I create a new activity using a Rail Web form, the server receives this:

  Start 127.0.0.1 For "/ activities" 2013-06-21 22:38:04 +02002 Create the processing controller # HTML as the parameter parameter: {"utf8" =>, "one ????" "Authenticity_token" = & gt; "PruaVLfUijjNrYfh17yJmQgYLrnrA713OjgdayudZAg =", "Activity" = & gt; {"Text" = & gt; "Test FRA ¥ n Web", "starts_at_formatted" = & gt; "23: 00"}, "Commit" => "Create Activity"}   

But when I post from my iOS app, it looks like:

  2013-06-21 22:36:10 0200 Processing ActivitiesController # started by 127.0.0.1 for the posting "/ activities" as JSON parameters: {"activityID" = & gt; "0", "auth_token" = & gt; "XkT2eqqdoNp5y4vQy7xA", "ends_at" = & gt; Zero, "starts_at" = & gt; "2013-06-21T22: 36: 10 + 0200", "text" = & gt; "insert", "updated_at" => Zero} Warning: Can not verify CSRF token authentication   

Ie me "activity" = & gt; Missing {...} bit which activity wraps data AFIncrementalStoreHTTPClient & gt ;? subclass

How do I get this, I need to make a massive manipulation of representationOfAttributes in my AFRESTClient & lt ofManagedObject : Return to subclass for wrapping the word "AFRestClient in your itemprop =" text ">

You need to apply -representationOfAttributes after

No comments:

Post a Comment