Class: PaperTrail::Human::Adapters::Formatters::Html
- Inherits:
-
Object
- Object
- PaperTrail::Human::Adapters::Formatters::Html
- Defined in:
- lib/paper_trail/human/adapters/formatters/html.rb
Instance Method Summary collapse
Instance Method Details
#call(result) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/paper_trail/human/adapters/formatters/html.rb', line 8 def call(result) [ %(<div class="paper-trail-version">), " <p>#{header(result)}</p>", ' <table>', ' <thead><tr><th>Field</th><th>Previous</th><th>Current</th></tr></thead>', ' <tbody>', *result[:fields].map { |f| table_row(f) }, ' </tbody>', ' </table>', '</div>' ].join("\n") end |