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關係。
謝謝!
喬納森