Hi, I'm working on rails project where I use json file for storing some data. Basically data are stored and get using ajax calls from jquery.
But there are some strange issues. For example, when I add data in json file using AJAX and then open file in Chrome: localhost:3000/example.json there are no data. I open the file in firefox and data exists. When i refresh file in Chrome there are data. Sometimes data is inserted correctly. Maybe it could be browser cache issue? I know that AJAX is asynchronous but sometimes there are few refreshes needed for data to be added- JSON file is in public folder and I'm adding data from rails controller like this is txt file. I just convert hash to json and insert json in file like it's txt file. What can be problem here? How can I make inserting and reading data in json file works correctly? If I'm not clear, I can exaplain this better, just say. I appreciate any kind of help -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

