elixir - How to write a query for a shared/footer.html.eex? -


i have shared footer show display on pages, almost. want display information database in it. instead of querying in each action of webapplication accross controller , passing via assigns in each action in each controller, there way query once in kind of action footer?

you may want consider creating controller plug allow assign footer information in number of controllers , actions. have following in controllers.

plug :assign_footer when action in [:index, :show, :edit] 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -