मैं इस त्रुटि मिलती है "चेतावनी: बड़े पैमाने पर असाइन संरक्षित नहीं किया जा सकता गुण: races_attributes" , जब निम्न इस http://railscasts.com/episodes/196-nested-model-form-part-1 रेल 3. परचेतावनी: नहीं कर पा रहे जन-असाइन संरक्षित विशेषताओं
कहाँ दौड़ एक घटक हैं घटनाओं की। यह मेरा मॉडल/race.rb है:
class Race < ActiveRecord::Base
belongs_to :event
attr_accessible :name, :unit
end
यह मेरा मॉडल/event.rb है:
class Event < ActiveRecord::Base
has_many :races, :dependent => :destroy
accepts_nested_attributes_for :races
attr_accessible :name, :date, :description, :location_name, :address_one, :address_two, :city, :state, :zip, :active, :races_attributes
end
किसी भी विचार?
मैंने प्रत्येक संबंधित attr_accessib के रूप में सभी विशेषताओं को जोड़ा है ले – Hosemeyer
ओह, मैं event_id को भूल गया। धत तेरे की! – Hosemeyer