我正在嘗試使用設計和活動商家編寫註冊。形式是複雜的,我的用戶對象是這樣的: class User < ActiveRecord::Base
include ActiveMerchant::Utils
# Include default devise modules. Others available are:
# :token_authenticatable, :e
我目前有三個模型,並試圖將其中一個模型(webpage.id)引用到另一個模型(Micropost)中 - 這裏是情況: class Member < ActiveRecord::Base
has_many :microposts
end
class Webpage < ActiveRecord::Base
has_many :microposts, :dependent
我有這些模型: class User < ActiveRecord::Base
has_one :city
accepts_nested_attributes_for :city
end
class City < ActiveRecord::Base
belongs_to :user
end
此控制器操作: def create
@user =
我有以下型號協會: class Order < ActiveRecord::Base
has_many :guests
has_many :customers, :through => :guests
accepts_nested_attributes_for :customers
end
class Customer < ActiveRecord::Base