Skip to content

[Idea] Option for applying special formatting to certain columns, e.g., Pretty-printing JSON #388

@rdlugosz

Description

@rdlugosz

Hi - Similar to the concept of smart_columns, or perhaps as an extension of them, how about a way to use a block of Ruby code to format the value of a column when displaying on the page?

The specific use case I have in mind for this is that I've got a result set that includes some JSON in one of the columns. It would be nice if there was a way I could apply some pretty printing (line breaks, indenting, etc) to that value before it's displayed in the table of results.

I suppose this would open up quite a few other options for customization, similar to how you can pass a block to a field in ActiveAdmin and do whatever you'd like with the value before it's displayed (e.g., adding links, styles, etc).

Thanks for considering!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions