Closed kevbaker closed 11 years ago
@kevbaker Hi there. Im not really sure how to help you out. I think you should try the QA instead. The issues section here is for bugs/features in the adapter, not support :)
Hello Viezel,
Sorry I meant to update this ticket. I figured this out right after I posted it. I was iterating over the collection incorrectly. switched to model.each and everything is happy.
Thanks so much for this project. Amazing!!!
glad it worked out!
One last quick note I thought I'd mention.
Rather than using the restsql project, I opted for dynamically switching the Sync Adapter, this.config.adapter.type
during runtime between "restapi" and "sql". Works like a charm.
This allows me to use the same models for restapi and sql and just swap out where to store the data. That in combination with a little syncmanager is working pretty well.
sounds great.. You should open source it. I have the restsql adapter aswell. I would be interested in your sync manager approach.
I will def be open sourcing it. We'll see where it ends up over the next couple weeks.
On Fri, Mar 22, 2013 at 12:42 AM, Mads Møller notifications@github.comwrote:
sounds great.. You should open source it. I have the restsql adapter aswell. I would be interested in your sync manager approach.
— Reply to this email directly or view it on GitHubhttps://github.com/viezel/napp.alloy.adapter.restapi/issues/6#issuecomment-15284666 .
Cool.. please let me know when you do.. :)
The issue
I am using RESTapi to interface with my Rails-based REST API. I am having issues parsing the response.
It GETs my data from the API fine. I can see the response JSON, but I am unable to pull the individual models out of the responded collection for processing. I'm sure I'm doing some thing obviously wrong.
BTW: I have validated the JSON response through both curl and jsonlint.
Code:
models/Job.js
alloy.js
Response
Log