1
는 다음과 같은 모델을 고려has_many, : through를 ActiveScaffold로 구현할 수 있습니까?
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 모델은 position 속성을 추가로 사용하여 hbtm 관계를 정의합니다.
감사합니다.
조나단