We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In 1.3.0 prerelease I get this when I try to render anything:
SystemStackError (stack level too deep): /Users/johnwest/.bundle/ruby/1.8/bundler/gems/restfulx-4c800dcb763416a71965ab45e5fadba4eb9ef01d-master/rails/./lib/restfulx/action_controller.rb:18:in render_without_fxml' /Users/johnwest/.bundle/ruby/1.8/bundler/gems/restfulx-4c800dcb763416a71965ab45e5fadba4eb9ef01d-master/lib/restfulx/action_controller.rb:31:inrender_without_amf' (...)
render_without_fxml' /Users/johnwest/.bundle/ruby/1.8/bundler/gems/restfulx-4c800dcb763416a71965ab45e5fadba4eb9ef01d-master/lib/restfulx/action_controller.rb:31:in
render code is format.fxml { render :fxml @projects }
The problem is in the render overrides in /lib/restfulx/action_controller.rb, they call themselves, I'm suprised I'm the first to encounter this.
Changing the only two functions to this 1.2.4ish way of doing it solved it:
def render_with_amf(options=nil, extra_options={}, &block) if Hash === options and options.key?(:amf) object = options.delete(:amf) unless String === object object = object.to_amf(options, &block) if object.respond_to?(:to_amf) end response.content_type ||= RestfulX::Types::APPLICATION_AMF render_for_text(object) else render_without_amf(options, extra_options, &block) end end def render_with_fxml(options=nil, extra_options={}, &block) if Hash === options and options.key?(:fxml) object = options.delete(:fxml) unless String === object object = object.to_fxml(options, &block) if object.respond_to?(:to_fxml) end response.content_type ||= RestfulX::Types::APPLICATION_FXML render_for_text(object) else render_without_fxml(options, extra_options, &block) end end
The sweet spot is: response.content_type ||= RestfulX::Types::APPLICATION_AMF render_for_text(object)
The text was updated successfully, but these errors were encountered:
This is a duplicate, discard it.
Sorry, something went wrong.
No branches or pull requests
In 1.3.0 prerelease I get this when I try to render anything:
SystemStackError (stack level too deep):
/Users/johnwest/.bundle/ruby/1.8/bundler/gems/restfulx-4c800dcb763416a71965ab45e5fadba4eb9ef01d-master/rails/./lib/restfulx/action_controller.rb:18:in
render_without_fxml' /Users/johnwest/.bundle/ruby/1.8/bundler/gems/restfulx-4c800dcb763416a71965ab45e5fadba4eb9ef01d-master/lib/restfulx/action_controller.rb:31:in
render_without_amf'(...)
render code is
format.fxml { render :fxml @projects }
The problem is in the render overrides in /lib/restfulx/action_controller.rb, they call themselves, I'm suprised I'm the first to encounter this.
Changing the only two functions to this 1.2.4ish way of doing it solved it:
The sweet spot is:
response.content_type ||= RestfulX::Types::APPLICATION_AMF
render_for_text(object)
The text was updated successfully, but these errors were encountered: