开发者

Is it possible to pass an array to content_for (ruby on rails)

开发者 https://www.devze.com 2023-03-23 14:28 出处:网络
Suppose I have a main layout, a nested layout, and a view. Each has its own CSS file associated with it.

Suppose I have a main layout, a nested layout, and a view. Each has its own CSS file associated with it.

Is it possible to pass the two CSS files for the nested layout and the view to the main layout so that it can include all three files into a single call t开发者_StackOverflow社区o Jammit's include_stylesheets (via content_for)?

The purpose is to leverage Jammit's concatenation functionality in prod.

I could use eval, but I'd like to avoid using that function.

Thanks

0

精彩评论

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

关注公众号