netzke / netzke-core

Framework for Sencha Ext JS + Ruby on Rails client-server components
http://netzke.org
Other
263 stars 77 forks source link

endpoint response auto convert params key to camelize #69

Closed comme closed 11 years ago

comme commented 11 years ago

in a endpoint, i call

endpoint_response.doClientMethod({no_camelize: 1})

but in chrome i find this request get response is {noCamelize: 1}, it's auto converted by this line https://github.com/netzke/netzke-core/blob/master/lib/netzke/core/railz/controller_extensions.rb#L100 .I think it should only auto convert client method name.

comme commented 11 years ago

After i read Hash#netzke_jsonify method on https://github.com/netzke/netzke-core/blob/master/lib/netzke/core/ruby_ext/hash.rb#L10-L26. I found use this code can avoid my problem:

endpoint_response.doClientMethod(ActiveSupport::JSON::Variable.new(Oj.dump({no_camelize: 1})))