1
考虑以下型号:是否可以通过ActiveScaffold实现has_many :: through?
class Artist < ActiveRecord::Base
has_many :artist_events
has_many :events, :through => :artist_events
end
class Event < ActiveRecord::Base
has_many :artist_events
has_many :artists, :through => :artist_events, :order => 'artist_events.position'
end
class ArtistEvent < ActiveRecord::Base
default_scope :order => 'position'
belongs_to :artist
belongs_to :event
acts_as_list :scope => :artist
end
是可以使用ActiveScaffold来管理这种类型的关系? ArtistEvent模型存在用于定义与位置的附加属性的hbtm关系。
谢谢!
乔纳森