我有三种模型交易,CellPhoneAttribute和手机设备。 模型之间的关系是: class CellphoneEquipment < ActiveRecord::Base
belongs_to :cellphone_deal_attribute
end
class CellphoneAttribute < ActiveRecord::Base
ha
是否可以以嵌套形式过滤/显示所示的元素? 例如: class User
has_many :user_shop_datas
end
视图: form_for @user do |f|
f.fields_for :user_shop_datas
....
class UserShopData < ActiveRecord::Base
belongs
我想写对于那些喜欢这个相互关联的2种不同型号的数据:当然 class Post < ActiveRecord::Base
has_many :roads
accepts_nested_attributes_for :roads, :allow_destroy => true
end
class Road < ActiveRecord::Base
belongs_