Renderers & manual actions
How this page is built
the gem renders it — this is all you write
Some renderers are soft dependencies: as: :markdown uses a markdown gem (commonmarker/redcarpet/kramdown), as: :asciidoc uses asciidoctor, and the :json cell pretty-prints and (with rouge) syntax-highlights. The gem feature-detects them — it never requires them — and raises at structure build with a clear message if you declare one whose gem is missing. Below, blurb renders as Markdown and metadata as JSON. The second card shows manual action placement: render with actions: false and drop crud_actions wherever you like.
app/models/book.rb
attribute :blurb, as: :markdown # commonmarker / redcarpet / kramdown
attribute :metadata, as: :json # pretty-printed + rouge-highlighted
fieldset :renderers, %i[title blurb metadata]
app/views/renderers/index.html.erb
<%= crud_record @book, fieldset: :renderers %>
<%# place the buttons yourself instead of the built-in actions column %>
<%= crud_record @book, fieldset: :renderers, actions: false %>
<%= crud_actions @book %> <%# row actions for a record %>
<%= crud_actions Book %> <%# collection actions for the model class %>
Read more: Fields & rendering · Views