質問

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