开发者

nesting partials in rails

开发者 https://www.devze.com 2023-03-18 06:28 出处:网络
I have created two partials: _listDialog.rhtml开发者_StackOverflow and _list.rhtml. the listDialog partial has all the code that the list partial contains + additional code for the dialogbox.this res

I have created two partials: _listDialog.rhtml开发者_StackOverflow and _list.rhtml.

the listDialog partial has all the code that the list partial contains + additional code for the dialogbox. this results in duplication of code.

how do I solve this? if I include the list partial in the listDialog partial, then we'll have nested partials (a partial inside a partial)

any ideas?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号