【发布时间】:2015-06-16 15:54:44
【问题描述】:
是否可以从该部分中获取传递给该部分的参数?
# in some_view.html.haml
= render 'foo_partial', some: "stuff", goes: "here"
# in foo_partial.html.haml
= arguments = ??? # im trying to get this to contain {some: "stuff", goes: "here"}
注意为了澄清,我想查看传递给部分的所有参数。
EDIT 2 我不是在问如何访问变量,而是要获取传入的所有内容的列表。Mods,请不要更改提供的代码,因为它是我的情况。更改代码会对问题本身产生影响。
谢谢
【问题讨论】:
-
为什么要编辑这个?更改示例代码可能会改变答案。来吧模组..
标签: ruby-on-rails haml