开发者

Rails 3.1 Template Inheritance not working for js file?

Rails 3.1 has Template Inheritance feature built in, very nice. But when I tried to use it with unobtrusive javascript, it doesn't work.

I have a bunch of controllers all respond to :js and all of the xxx.js.erb are almost the same, so I moved them into app/views/applicatio开发者_JAVA技巧n folder, and then the controller just couldn't find the xxx.js.erb from that folder like it does for finding xxx.html.erb. Am I miss something or it isn't supported?


It seems to me your javascript files should be in the assets folder instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜