arbre icon indicating copy to clipboard operation
arbre copied to clipboard

doctype in arbre layout

Open senid231 opened this issue 9 years ago • 2 comments

i get

undefined local variable or method `doctype' for :Arbre::Context

on rendering layout application.html.arb

doctype # this line
html do
  head do
    title 'AdminLTE Arbre'
    text_node (stylesheet_link_tag  'application', 'data-turbolinks-track' => true, media: 'all')
    javascript_include_tag 'application', 'data-turbolinks-track' => true
    text_node csrf_meta_tags
  end

  body do
    yield
  end
end

how can i add <!DOCTYPE html> to layout?

senid231 avatar Oct 23 '15 21:10 senid231

I'm sure there's a better way but the only way I've managed to do it is by using the code below:

text_node Arbre::HTML::Document.new.doctype
html do
  head do
    title 'AdminLTE Arbre'
    text_node (stylesheet_link_tag  'application', 'data-turbolinks-track' => true, media: 'all')
    javascript_include_tag 'application', 'data-turbolinks-track' => true
    text_node csrf_meta_tags
  end

  body do
    yield
  end
end

mushfick avatar Dec 02 '15 22:12 mushfick

thanks

senid231 avatar Dec 12 '15 17:12 senid231