考虑以下模型:
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 关系。
谢谢!
乔纳森