ruby on rails - How to stop outputing my own html source? -
this may werdeist bug i've ever met.
i'm building app personal use on ruby on rails, , it's still long way done. main layout follows:
!!! %html.uk-height-1-1 %head = render 'layouts/head' %body.uk-height-1-1.uk-width-1-1 = if user_signed_in? .alerts = render 'layouts/alerts' .navbar = render 'layouts/navbar' .uk-container.uk-height-1-1 = yield = if user_signed_in? .footer = render 'layouts/footer'
the alerts , footer partials still empty, head partial default code rails generates (minus turbolinks) , navbar partial is, well, navbar. change made on application controller adding before_action :authenticate_user!
, users logged in can see main site.
but run server, following showed up:
it outputs it's own html source code plain text!
, twice: first, right after navbar partial, , last after footer partial.
i've never met close this, , attempt find source of error useless.
how can stop this, or @ least find reason of madness?
replace both of = if
- if
.
lines starting =
append return value of if statement view, non-html safe string.
lines starting -
evaluated ruby code without appending view.
Comments
Post a Comment