Skip to content

Fixed displaying empty json in edit form#2980

Merged
mshibuya merged 1 commit into
railsadminteam:masterfrom
Kaligo:bugfix/display_empty_json
Feb 17, 2018
Merged

Fixed displaying empty json in edit form#2980
mshibuya merged 1 commit into
railsadminteam:masterfrom
Kaligo:bugfix/display_empty_json

Conversation

@arnvald

@arnvald arnvald commented Jan 15, 2018

Copy link
Copy Markdown
Contributor

The problem

I have empty json saved in database (not null, just {})
I want to edit my record in RailsAdmin

What I see: the json field is empty
What I should see: field should display {} instead

The solution

Currently we check whether to display json based on value.present?, which returns false for empty json. Instead we should just check value

@mshibuya mshibuya merged commit a5ed925 into railsadminteam:master Feb 17, 2018
@mshibuya

Copy link
Copy Markdown
Member

👍

mshibuya added a commit that referenced this pull request Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants