Rails does not accept request

0

I have a simple API in Rails, it only reads the database, and returns the JSON according to the request.

However, I was testing the API, making a request with another device, connected via wireless, and I was not able to get JSON in response. I looked for the error on the internet, and it looks like it's something related to protect_from_forgery , but even I commenting on it, I could not. So the API does not have a lot of security related issues, for example, requiring token and stuff like that, because I'm a beginner, and I'm not really sure how to develop that part.

Follow the github link for the project: link

    
asked by anonymous 15.05.2015 / 13:59

2 answers

0

No details of what and how you are accessing, gets knocked around, but

You're probably having a problem with CORS .

This gem solves:

link

    
15.05.2015 / 15:12
0

Do the following

Edit as below / controllers / applications   protect_from_forgery with:: null_session

    
16.08.2016 / 20:53