Reputation: 23576
I just realized that the .erb
extension can be added to .js
files (what a time saver that would have been). Is there a list of file types that can take advantage of the features of .erb
? Or is any text file .erb
capable? I primarily use variable placement e.g. <%= @user.id %>
Upvotes: 3
Views: 544
Reputation: 230296
Yes, you basically can add an .erb
extension to any text file and start templating away :)
I personally only tried it on views and JS files, but I don't see why it wouldn't work for other files.
Upvotes: 6