JSON editor icons are invisible in production
sedubois opened this issue · comments
As reported in eddietejeda/administrate-field-json#8, icons don't show up in production because /assets/jsoneditor-icons.svg doesn't exist on the server.
Here is how it looks in development:
The location of the icons can only be guessed by hovering the mouse until a tooltip shows up.
Is there any solution or workaround to this?
Tested with Rails 5.2.3, Administrate 0.12.0, administrate-field-jsonb 0.4.1.
As a workaround I copied the gem's image (under vendor/assets/images/jsoneditor-icons.svg
) to public/admin/
then added this to config/routes.rb
:
# Fix errors due to https://github.com/codica2/administrate-field-jsonb/issues/11
get '/assets/jsoneditor-icons.svg', to: redirect("/admin/jsoneditor-icons.svg")
I just issued #15 with a fix for this.