Rails 3, nested multi-level forms and has_many through

前端 未结 2 830
没有蜡笔的小新
没有蜡笔的小新 2020-12-13 03:17

I\'m trying to get it to work but it dosen\'t!

I have

class User < ActiveRecord::Base
  has_many :events, :through => :event_users
  has_many          


        
2条回答
  •  不思量自难忘°
    2020-12-13 03:40

    Does the events_users model not have an ID column? Since there's an additional field (user_type) then EventUser is a model and should probably have an ID. Maybe that's why user_type isn't being set in your first case.

提交回复
热议问题