1

In my web app I want to connect records of the same model. I tried severals approaches (has_many :through, has_and_belongs_to_many, attachable:reference), read a lot of tutorials (http://ruby.railstutorial.org/chapters/following-users#top) and watched the tutorial by railscast (http://railscasts.com/episodes/163-self-referential-association). But I'm afraid I still don't really understand it, as it wouldn't work.

And I'm using the rails_admin gem.

What I want:

I have a Model called "Article" and when I create a new record of this model I would like to add related articles by the same (rails_admin) form, ideally ordered by priority.

How do I have to structure the join model, what do I have to add for attr_accessible and how can I add n-numbers of the related articles by the rails_admin form?

Help would be greatly appreciated as I'm struggling with this now for quite some time!

Daniel Reiner
  • 137
  • 1
  • 2
  • 11
  • possible duplicate of [Creating a model that has a tree structure](http://stackoverflow.com/questions/5109303/creating-a-model-that-has-a-tree-structure) – mabi May 15 '14 at 17:34

0 Answers0