I’m a rails developer trying to learn Backbone and then I ran into this problem: since Underscore templates include symbols like <%=%>, I guess templates can’t be included into erb files, so is it okay to have a rails partial for every single template? And what extension should it be?
I’m a rails developer trying to learn Backbone and then I ran into this
Share
You can escape the erb symbols by using two
%in the opening tag, and put your backbone templates in the rails views:will output the following in your page:
Putting your Backbone templates directly in your rails views is IMHO the best option when you’re trying to learn. You’re already wrestling with the new concepts, no need to add another hurdle.