Open pegasus430 opened 8 years ago
%w(Page).include? bindings[:abstract_model].model_name
instead of
%w(Page).include? bindings[:Image].model_name
bindings[:abstract_model] explanationCorrect code:
Parent model
Embedded model
has_mongoid_file_upload ....
for embedded model is inherited from this
rails_admin config for parent model
Unfortunately documentation is not written completely. I will correct it soon.
Now I am on facing to use your gem, but that doesn't works for some reasons. Can you tell me why? I did bundle install after checking in my gemfile, and add the following in rails_admin.rb
RailsAdmin.config do |config| config.actions do ...... multiple_file_upload do visible do %w(Page).include? bindings[:Image].model_name end end end end
and I customized my code for image model.
has_mongoid_attached_file :imagen, styles: {main: "1000x1000>"}
But that doesn't works as I exptected. If you have any positive idea, I'd appreciate very much.