Is it possible to get back to the parent? #16

sdhull opened this Issue Apr 7, 2011 · 1 comment

2 participants


So if I have a book xml like

<book title="Footown Usa">
  <chapter title="The showdown" />
  <chapter title="The godown" />
  <chapter title="The outcome" />
  <chapter title="The finale" />
  <chapter title="The wrapup" />

class Book
  include HappyMapper
  attribute :title, String
  has_many :chapters, Chapter

class Chapter
  include HappyMapper
  attribute :title, String

Would it be possible to get back to the book object from a chapter object? Maybe something like chapter.parent? Except I already know that that won't work. Is there some other magical method I'm missing here?


Closing due to staleness and the fact that the project is currently not being maintained.

@jnunemaker jnunemaker closed this Jun 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment