Module: RailsAdmin::Adapters::Mongoid::Extension::ClassMethods
- Defined in:
- lib/rails_admin/adapters/mongoid/extension.rb
Instance Method Summary collapse
- 
  
    
      #accepts_nested_attributes_for_with_rails_admin(*args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Mongoid accepts_nested_attributes_for does not store options in accessible scope, so we intercept the call and store it in instance variable which can be accessed from outside. 
Instance Method Details
#accepts_nested_attributes_for_with_rails_admin(*args) ⇒ Object
Mongoid accepts_nested_attributes_for does not store options in accessible scope, so we intercept the call and store it in instance variable which can be accessed from outside
| 33 34 35 36 37 38 39 40 | # File 'lib/rails_admin/adapters/mongoid/extension.rb', line 33 def accepts_nested_attributes_for_with_rails_admin(*args) = args. args.each do |arg| [arg.to_sym] = .reverse_merge(allow_destroy: false, update_only: false) end args << accepts_nested_attributes_for_without_rails_admin(*args) end |