stephskardal / rails_admin_import

Rails Admin Import functionality
http://www.endpoint.com/
MIT License
160 stars 122 forks source link

hide and default import fields like 'update lookup field' and 'update if exists' #72

Closed nrankin closed 6 years ago

nrankin commented 8 years ago

I need just one model imported and the import will be done by a user that isn't very technical so I basicaly want to make it bulletproof for this particular model by not letting them change some of the import setting fields like the mapping field (which I realise I can create a default but the user could still change it) and the boolean for update.

I haven't been able to find a way to do this with rails_admin_import - I'm hoping I have I just missed something?

monkbroc commented 8 years ago

A quick method would be to copy the app/views/rails_admin/main/import.html.haml to the same path in your project and make those fields hidden. Let me know if that works for you.

nrankin commented 8 years ago

hey, thanks for the suggestion... unfortunately, just putting that file in rails_admin/main caused the mapping field to display #RailsAdmin::Config::Fields::Types::Integer:0x007fd4be98e528 rather than the field names of the associated table.

monkbroc commented 6 years ago

I added notes in the readme on customizing the UI