Galaxia, Games, MPOGs, Programming, Ruby on Rails, Technology, Web Programming

Tree structures in Ruby on Rails

<![CDATA[This is becoming a trend – another built-in feature of Rails that will seriously help Galaxia development.

You can use acts_as_tree in a model to make it, well, act as a tree. What this means is you add an extra field to the database called parent_id that tracks object’s parents. Rails automatically manages this for you and adds extra methods for dealing with trees (things for accessing parent, ancestors, children etc.). Just like the post on type, this is something I was already doing with Galaxia but managing myself.

OOP]]>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s