Skip to content

Different options for STI models #55

Closed
@stoicskyline

Description

@stoicskyline

Quick question: is it possible to have different acts_as_tree options for subclasses of a STI model? Specifically, can we do this:

def Person
  acts_as_tree
end

def Person::Teacher < Person
  acts_as_tree :order => 'age'
end

def Person::Student < Person
  acts_as_tree :order => 'name'
end

In this example, each teacher, ordered by age, has children ordered by name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions