문제

I'm removing some views that are no longer in use and I'm just wondering if it's safe to delete the corresponding js files. For example, if I delete the file

views/admin/products/index.html.erb

Then, is it generally okay to delete the file

public/javascripts/app/views/admin/products/index.js
도움이 되었습니까?

해결책

It depends on what's inside the js (or coffee) files. So, if you never used the js file, meaning the file has the default text added by rails when the file was first generated, than yes, it's fine to delete. However, if you're including that file in other views because you have some custom code in that file than you should probably extract it elsewhere first.

Also please note, if you delete that file, make sure you're not rendering it in your controllers.

다른 팁

It's your wish.If the file doesn't contains any data.you can delete it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top