OK, here are 3 new developer railways.
I want my jquery to be my controller here from the Rail 3 application for json projects.
def Your Projects @ Projects = Projects.Hotel (Current_User) response_to do | Format | Format.html # index.html.erb format.json {Render: json = & gt; @ Projects} End End
I used J.K.S.SS. Line ... I have in Junkies:
$ Ajax ({url: '/ project / your projects', datatype: 'jason'});
So I think the server should return to the server instead: "Template is unavailable", "missing template ,,,, with {: locale => [: en: En],: handlers => [: rjs ,: rhtml ,: builder ,: rxml ,: Erb] ,: formats => [: html]} in the visual path "
Do you want to return jsOn Need a template? Railway 3 app should be aware of how to format Jason?
Routings file:
Resources: Collecting Projects 'Your Projects End End'
You can accept: the application / json
header for real REST, or you can add the format of the URL for quick hacking:$ Ajax ({url: '/projects/yourprojects.json', datatype: 'Jason'});
Comments
Post a Comment