Helper “fields_for” not working
问题 I'm using nested attributes, but the fields aren't loaded in my view. Someone know what I missing? Rails 3.1, Ruby 1.9.2 Model 1: class Traditions::Material < ActiveRecord::Base has_one :material_asset, :dependent => :destroy validates_presence_of :title accepts_nested_attributes_for :material_asset end Model 2: class Traditions::MaterialAsset < ActiveRecord::Base belongs_to :material has_attached_file :asset validates_attachment_presence :asset end View (HAML): = form_for @material, :html =>