我是CakePHP的新手,我想将其他数据保存到我的HABTM连接表中。我读过,一个人应该切换到hasMany through这一点,但也有下面的注释在蛋糕食谱: Changed in version 2.1.
You can set unique setting to keepExisting circumvent losing extra data during the save opera
好吧,如果你有类别和文章之间的哈比特关系,现在通过类别索引页面是可能执行一个过滤器,使用两个选择框填充与类别,其中显示属于任何一个或两个类别的文章? 这是我的尝试。 类别控制器 def index
@categories = Category.all
end
def show
@category = Category.find(params[:name][:id])
e
我有一个关系模型,在这个模型中,学生和雇主可以在申请项目时进入关系。下面是型号: class Student < User
has_many :relationships, dependent: :destroy
has_many :employers, through: :relationships
end
class Employer < User
has_