Skip to content

Instantly share code, notes, and snippets.

View melcher's full-sized avatar

Graham Melcher melcher

View GitHub Profile
@melcher
melcher / example.rb
Created December 28, 2013 20:33 — forked from kritik/gist:1256399
Rails Admin nested form example
class Product < ActiveRecord::Base
has_many :material_product_mappings, :dependent => :destroy, :inverse_of => :product
has_many :materials, :through => :material_product_mappings, :autosave => true
accepts_nested_attributes_for :material_product_mappings # really needed feature
#...
end