I have a Campaign model and a DeliverySchedule model. Campaign and DeliverySchedule are related like thus: Campaign has one DeliverySchedule. So assuming I have Campaign @campaign, I can check it''s delivery schedule like thus: @campaign.delivery_schedule ******* I create new campaigns from a form post like this (pretty standard): @campaign = Campaign.new(params[:campaign]) My question is concerning how I can also create the delivery schedule for the campaign in the same form post. All that''s required to make a DeliverySchedule is a camapign_id:integer and a time:datetime. My problem is that I can''t figure out how to name my HTML elements to facilitate this, e.g.: <input type="hidden" name=campaign[delivery_schedule][time]" value="2007-09-20 12:34:34" /> However this causes a error: ActiveRecord::AssociationTypeMismatch (DeliverySchedule expected, got HashWithIndifferentAccess): Any ideas how to do this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---