janx / rails_admin_jcrop

Jcrop plugin for RailsAdmin, enable image cropping function on image fields.
MIT License
47 stars 63 forks source link

Field dispear #18

Open rankai opened 10 years ago

rankai commented 10 years ago

After I modified the rails_admin.rb file to enable jcrop: config.model User do configure :photo, :jcrop

Below is optional

edit do field :photo do jcrop_options aspectRatio: 500.0/320.0 end end end

It has following issues:

1.It only works if the user has a photo and I click the photo in the edit page. If I change another image, I have to go back to the index, and edit again to use jcrop

  1. When I did the configurations above, all other fields disappear in rails_admin, no matter I create new user or edit an existing user
walidvb commented 9 years ago

@kevinran When you use

edit do 
    field :photo
end

you need to explicitly list all the attributes what you want to see.