开发者

Writing raw prototype code to an rails application

In most of the tutorials I have seen, whenever there is a requirement of add raw prototype code, the author uses application.js file. But in a huge application,writing the js code for the whole app in single file doesn't make sense. So what is the right way of doing it? Is it possible to write js code in different files and add it to my template based on my actio开发者_如何转开发n?


Of course, you can create a js file for each of your view. And include them appropriately.

application.js should only contains general purpose javascript function.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜