Pertanyaan utamanya lebih pada "apakah memang bisa dikelompokkan jadi satu
entitas besar (superclass)? Apa nama superclass itu?"

Saya sendiri membuat perjenjangan wilayah administratif (Propinsi,
Kabupaten, dst) pakai STI *dan* acts_as_tree (sedang nimbang2 pakai
ancestry).

class Location < AR::Base
  acts_as_tree
end

class Propinsi < Location
  has_many :kabupaten2  #mbuat aturan pluralisasi sendiri di
config/environment.rb
end

class Kabupaten < Location
  belongs_to :propinsi
end

Hope this helps

2009/11/12 rahmat budiharso <[email protected]>

>
>
> saya punya format data seperti ini:
>
> branch has many regions
>
> region belongs to branch
> region has many streets
>
> street belongs to region
> street has many customers
>
> atribut untuk branch, region n street sama (hanya code n name), nah
> kira-kira lebih baik pakai plugin acts_as_tree atau single table inheritance
> ?
>
> makasih...
>
> (\ /)
> (O.o)
> (> <)
>
> This is Bunny. Copy Bunny into your signature to help him on his way to
> world domination.
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

ID-Ruby
Berdiskusi dan belajar bersama Bahasa Pemrograman Ruby, termasuk segala varian 
Ruby (JRuby, Rubinius, IronRuby, XRuby), dan program yang dibuat dengan Ruby 
(Ruby on Rails, JRuby on Rails, Merb)

<*> Follow Ruby Indonesia on Twitter
    http://twitter.com/rubyindonesia

<*> Kunjungi Situs Resmi Ruby Indonesia
    http://www.ruby-lang.org/id/

<*> Join Ruby Indonesia on Facebook
    http://rubyurl.com/QV48

<*> Join Ruby Indonesia on LinkedIn
    http://rubyurl.com/eh0i

<*> Kunjungi *arsip milis* id-ruby di
    http://groups.yahoo.com/group/id-ruby/messages
    http://www.mail-archive.com/[email protected]/
    http://rubyurl.com/Q8DD
    http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia

<*> Baca peraturan id-ruby sebelum posting
    http://rubyurl.com/gay1
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/id-ruby/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/id-ruby/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Kirim email ke