Rails, Appcelerator, and JSON -
i'm trying appcelerator mobile app pull in json rails app.
here how i'm pulling in json in appcelerator:
loader.open("get","http://xxx/mobile_api");
this works following urls: http://api.twitter.com/1/statuses/user_timeline.json?screen_name=mobtuts http://www.coovents.com/tit_json_local.php
in rails app, generate json this: @locations_json = @locations.to_json render :text => @locations_json
i copied text output rails app , created php text file (coovents) , works.
the json generated app isn't working appeclerator, json generated twitter works fine. when copy json generated app , paste in separate file, works too.
maybe because php serving "text/html"?
try serving "application/javascript" or "application/json"?
Comments
Post a Comment