Re: Rails, insert into 3 tables from 1 controller

HelloRails
Mon, 04 Apr 2011 08:10:37 -0000

Of course, there are my models (did you mean this , yes?)


#question model
class Question < ActiveRecord::Base
  has_many :answers
end

#token model
class Token < ActiveRecord::Base
  has_one :answer
end

#email model
class Email < ActiveRecord::Base
end