elixir - Flash messages in Phoenix show module not found -
i'm attempting recreate flash messages guide in phoenix i'm getting error states undefined function: phoenix.controller.flash.put/3 (module phoenix.controller.flash not available)
however: have plug :fetch_flash
in router.ex browser pipeline. have included the:
use phoenix.controller alias phoenix.controller.flash
at top of module definition. i'm attempting adapt syntax code (where receive parameter in render).
you looking @ old version of documentation (for v0.7.2
) latest v0.14.0
, want following code:
conn |> put_flash(:error, "some message") |> put_flash(:info, "another message")
this change made in v0.8.0
the correct docs version available @ http://www.phoenixframework.org/v0.14.0/docs/controllers
Comments
Post a Comment