0
我正在按照Wash_Out页面上的指南进行操作。而我得到以下错误,当我打电话的SOAP方法之一:在Rails 3.1中使用wash_out时无值参数
NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]):
的API控制器看起来像这样
class ApiController < ApplicationController
include WashOut::SOAP
soap_action "integer_to_string",
:args => :integer,
:return => :string
def integer_to_string
render :soap => params[:value].to_s
end
soap_action "concat",
:args => { :a => :string, :b => :string },
:return => :string
def concat
render :soap => (params[:a] + params[:b])
end
end
到WSDL的请求,运行正常。对于上述图书馆,我也将其列为bug report。我找不到这是Rails问题还是Wash Out问题。 params变量在正常控制器操作中可用。
版本:
- 的Rails 3.1.3
- wash_out 0.2.3
- 的Ruby 1.9.3
其实我是在GitHub上打开这个问题的同一个人。 :)我忘了关闭这个并添加信息。抱歉 – 2012-01-25 22:48:53