Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Erlang 0.35 KB | None | 0 0
  1. defmodule SomeModule do
  2.    alias Phoenix.HTML
  3.  
  4.   def my_very_own_li(class, do: block ) do
  5.         content_tag(:li, block, class: class )
  6.   end
  7.    
  8.   def my_very_own_href(class, path) do
  9.     content_tag(...)
  10.     ....
  11.   end
  12. end
  13.  
  14.  <%= my_very_own_li("some_class") do %>
  15.    <%= my_very_own_href("maybe_a_child_class", path, ...) %>
  16.  <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement