Fabio Kreusch wrote:
> I am still stuck with this. Does anyone knows if this is the expected
> beavior for Rails? Should respond_with on update really return an
> empty json object?

I pretty sure the Rails behavior is as intended. Rails basically says 
the save was successful by returning a 200 status code.

jQuery however, considers the request successful if it gets a 200 status 
code AND some valid json content.

Personally, I like the Rails way better here.

But nonetheless, I'm currently stuck with the same problem.

An ugly (but working!) solution would be to replace your respond_with 
with this
render :json => { :ok => true }

Did you find a nicer solution?
-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to