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)

phoenix module 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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -