Advertisement
Guest User

Untitled

a guest
May 30th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. config.model Utility do
  2. configure :preview do
  3. pretty_value do
  4. util = bindings[:object]
  5. %{<div class="blah">
  6. #{util.name} #{util.phone} #{util.logo}
  7. </div >}
  8. end
  9. children_fields [:name, :phone, :logo] # will be used for searching/filtering, first field will be used for sorting
  10. read_only true # won't be editable in forms (alternatively, hide it in edit section)
  11. end
  12.  
  13. list do
  14. field :code
  15. field :priority
  16. field :preview
  17. end
  18.  
  19. show do
  20. field :code
  21. field :priority
  22. field :preview
  23. end
  24.  
  25. # other sections will show all fields
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement