Method: Ancestry::MaterializedPath::InstanceMethods#child_ancestry
- Defined in:
- lib/ancestry/materialized_path.rb
#child_ancestry ⇒ Object
The ancestry value for this record’s children This can also be thought of as the ancestry value for the path If this is a new record, it has no id, and it is not valid. NOTE: This could have been called child_ancestry_in_database
the child records were created from the version in the database
200 201 202 203 204 |
# File 'lib/ancestry/materialized_path.rb', line 200 def child_ancestry raise(Ancestry::AncestryException, I18n.t("ancestry.no_child_for_new_record")) if new_record? [attribute_in_database(self.class.ancestry_column), id].compact.join(self.class.ancestry_delimiter) end |