【发布时间】:2012-05-06 03:55:32
【问题描述】:
我已经使用 httparty 发布过。
例如
options={
:foo => '123'
:bar => 'second',
:baz => 'last thing'
}
HTTParty.post("localhost/tests" , options)
如何在远程应用控制器中检索选项参数: 例如
#post /tests
def create
@k=options[:name] -------> Here is my question, How can I access options[:name]?
我的意思是我应该将选项作为 create 方法的参数传递吗?比如:
def create(options)
@k=options[:name]
【问题讨论】:
标签: ruby-on-rails post httparty