Add back pretty formatting of non-symbol attributes. #4538
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3efb359, switched around a bunch of code, but also scoped
pretty_format
-ing to onlysymbol attributes.
This broke formatting in our app. In Active Admin v1.0.0.pre2 code like:
would auto link the returned model, but pre4 merely returns an
inspect
like output.I think scoping
pretty_format
to only symbol attributes was an oversight as themethod clearly knows how to handle lots of different objects.
This refines
format_attribute
so we can still get nice status tags for booleanfields, but get pretty formatted output for the rest of the values like pre2 and
earlier did.