I am new to the hanami world. I wrote this code:
module Web::Views::Home class Index include Web::View include Hanami::Helpers::HtmlHelper def title html.header do h1 'Test search engine', id: 'title' hr div(id: 'test') do link_to('Home', "/", class: 'mnu_orizontal') link_to('About', "/", class: 'mnu_orizontal') end end end end end
I call the title method in the template. Html result:
<header> <h1 id="title">Test search engine</h1> <hr> <div id="test"> <a class="mnu_orizontal" href="/">About</a> </div> </header>
Why is the second link overwriting the first? Where is my mistake?
Thanks for any answers.
source share