0
私は2モデルRubyのレール上のクエリに関連する
FOLDERS を持っている: に名前を付ける:
AUTHFOLDERS をPARENT_ID: をfolder_id: をのcompany_id:
class Folder < ActiveRecord::Base
has_many :authfolders
has_many :companies, :through => :authfolders
accepts_nested_attributes_for :authfolders
validates :name, presence: true
end
class Authfolder < ActiveRecord::Base
belongs_to :company
belongs_to :folder
end
を共有#for役割: をUSER_IDどうすれば "フォルダ"を選択できますか??