Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is extention .html.arb for Ruby on Rails?

I am in a project in which I found a file with the extension .html.arb, in my app/admin folder. What is the difference between this extension and the .html.erb extension?

like image 608
Tomás Lima Avatar asked Jan 13 '14 15:01

Tomás Lima


People also ask

What is an ARB file in ruby?

arb is the default file extensions for Arbre, a Ruby DSL for defining HTML views in Ruby instead of HTML or a templating language like ERb, Mustache, Liquid, or HAML.

What is HTML ERB file?

As @Chowlett mentioned before, erb stands for Embedded Ruby. When you define any file as ". html. erb" that means it's an HTML file with ruby code embedded in it and it is similar to ". rhtml" extension of rails file.


1 Answers

@levinalex already pointed you in the right direction, but to make it more clear:

.html.arb is the view partial designation for Arbre, just like .html.erb is used by ERB and .html.haml is used by Haml.

like image 109
seanlinsley Avatar answered Sep 20 '22 18:09

seanlinsley