Permalink
Browse files

parent_readonly associations shouldn't be editable through multiselects

  • Loading branch information...
1 parent be988f7 commit fba5479e33c103b4b982a301fa0ad073da19f966 @pehlert committed Nov 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/views/rails_admin/main/_form_filtering_multiselect.html.haml
@@ -23,7 +23,7 @@
js_data = {
:xhr => xhr,
- :'edit-url' => (authorized?(:edit, config.abstract_model) ? edit_path(:model_name => config.abstract_model.to_param, :id => '__ID__') : ''),
+ :'edit-url' => (authorized?(:edit, config.abstract_model) && !field.parent_readonly ? edit_path(:model_name => config.abstract_model.to_param, :id => '__ID__') : ''),
:remote_source => index_path(config.abstract_model, :source_object_id => form.object.id, :source_abstract_model => source_abstract_model.to_param, :associated_collection => field.name, :current_action => current_action, :compact => true),
:sortable => !!field.orderable,
:cacheAll => !!field.associated_collection_cache_all,

0 comments on commit fba5479

Please sign in to comment.