Author Topic: Buffalo v0.11.0 issues with flash and application.html?  (Read 3204 times)


  • Calf
  • *
  • Posts: 1
Buffalo v0.11.0 issues with flash and application.html?
« on: July 18, 2018, 01:58:59 am »
I am a beginner at using Golang and Buffalo. I am trying to create a password authentication service using the authrecipe from However, upon trying to run this using buffalo dev, I am receiving the following error from the JSON dump:

Code: [Select]
ERRO[2018-05-10T14:20:48-04:00] application.html: line 14: _flash.html:
Code: [Select]
line 3: flash: unknown identifier content_type=text/html db="0s" duration="5.354757ms" human_size="0 B" method=GET params="{}" path=/ render="659.229Ás" request_id="fa1ad5b329-b4e23f788b" size="0" status="0"
In line 14 application.html file, there is a reference to the flash folder, and in line 3 of my _flash.html file, there is a variable called flash. Has anyone else received this error? How did you fix it? I have tried to delete the flash command, but that did not resolve the problem and the same error kept appearing.

application.html code:

Code: [Select]
<!DOCTYPE html>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <title>Buffalo - Coke</title>
    <%= stylesheetTag("application.css") %>
    <meta name="csrf-param" content="authenticity_token" />
    <meta name="csrf-token" content="<%= authenticity_token %>" />
    <link rel="icon" href="<%= assetPath("images/favicon.ico") %>">

    <div class="container">
      <%= yield %>

    <%= javascriptTag("application.js") %>

_flash.html code:

Code: [Select]
<div class="row">
  <div class="col-md-12">
    <%= for (k, messages) in flash { %>
      <%= for (msg) in messages { %>
        <div class="alert alert-<%= k %>" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <%= msg %>
      <% } %>
    <% } %>