开发者

Create an incremental placeholder in NHaml

开发者 https://www.devze.com 2022-12-11 10:11 出处:网络
What I want to reach is a way to add a script and style placeholder in my master. They will include my initial site.css and jquery.js files.

What I want to reach is a way to add a script and style placeholder in my master. They will include my initial site.css and jquery.js files. Each haml page or partial can then add their own required file开发者_JAVA技巧s to those placeholders.

Currently I'm creating two strings in my master that I append to in my views.

This results in an ugly and error prone rendering.

Is there a better way to implement this?


Is there a better way to implement this?

Yes. This is how I did it and so far it works great for me.

0

精彩评论

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