Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gon.watch produces 500 internal server error #65

Closed
marcamillion opened this issue Nov 1, 2012 · 3 comments
Closed

gon.watch produces 500 internal server error #65

marcamillion opened this issue Nov 1, 2012 · 3 comments

Comments

@marcamillion
Copy link

I got gon setup fine and am able to successfully access data from my model in my JS. However, once I try to use gon.watch this is the error I get:

GET http://localhost:3000/weights?_method=GET&gon_return_variable=true&gon_watched_variable=weight 500 (Internal Server Error) jquery.js:8215

This is my weights.js.coffee

console.log gon.weight if gon
gon.watch('weight', interval: 1000) if gon

My weights controller index action looks like this:

gon.watch.weight = current_user.weight

I even tried adding a callback and am still getting this error.

Thoughts?

P.S. My environment is:

$ rails -v
Rails 3.2.8
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]

Edit 1: the console.log produces the right object:
Object

@gazay
Copy link
Owner

gazay commented Nov 1, 2012

Thank you for issue, I'll check it as soon as possible:)

@marcamillion
Copy link
Author

bump

@gazay
Copy link
Owner

gazay commented Nov 13, 2012

Sorry for delay, I checked by myself and I get right requests to server with code you provided. Can you show server log for 500 error?

@gazay gazay closed this as completed Nov 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants