hyperstack-org / hyperstack-org/hyperstack

top level rails component should automatically pass view helper values

未關閉
#210 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
JavaScript
星號
538
分支
41
PR 合併指標
30 天內沒有已合併 PR

描述

For example
```haml
= mount_component 'Header', controller_name: controller_name, action_name: action_name, flash: flash.as_json
= yield
```
is pretty verbose
instead, just have the top_level_rails component introspect the component being mounted, and
1. if the param is not being provided and
2. if that there is a view_helper with that name, then send the value of the view_helper.

You still have to declare the params in the Component, that is not too bad. Saying it 4 times to access it once, is toooooo much.

Note that is will need #219 to work nicely (i.e. flash.as_json has to be automagic)

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。