【发布时间】:2015-08-18 12:39:27
【问题描述】:
我有一个已经定义好的工作方法,
render_format(doc,host,table_info)
我在某个位置调用了这个方法,其中我将参数传递为,
render_format("Daily Transactions in POS", {:doc => xml,:schema_name => "#{schema_name}",:store_code => "#{store_code}"}, :sales_log => "#{sales_log}")
这工作得很好。
现在我必须将此方法称为,
render_format(:doc => xml,:host => "bhindi.rw:3000",:table_info => {'hdr' => 'pos_invoices', 'line' => 'pos_invoice_lines', 'id' => 'pos_invoice_id', 'check_image_flag' => 'Y'})
但这给出了 ArgumentError,Argument 的错误数量(1 对 3),也就是说,它将所有这些视为一个单独的参数。这是为什么?
【问题讨论】:
标签: ruby-on-rails arguments symbols