I have a block of code that is used by the layout file (html.erb) of
every view. What is the best way to include this piece of code in all
layout files?
Can I actually include a Ruby file in an html.erb file, analogous to
how files are included in PHP?
I have a block of code that is used by the layout file (html.erb) of
every view. What is the best way to include this piece of code in all
layout files?
Can I actually include a Ruby file in an html.erb file, analogous to
how files are included in PHP?
Thanks! I gathered something was wrong with the way my application was
built. So, I shifted to a single layout file and specified the layout
in the application controller.
But its always good to know how code can be shared.