0

I have a self referential association:

has_many :households
has_many :relations, :through => :households
has_many :inverse_relationships, :class_name => 'Household', :foreign_key => 'friend_id'
has_many :inverse_relations, :through => :inverse_relationships, :source => :person

Im my controller with decent_exposure I use:

expose(:neighbor)
expose(:neighbors)

Now in my views in haml with simple_form I have:

= f.input  :first_name,:label => 'First Name'
= f.input  :middle_name, :label => 'Middle Name'
= f.input  :last_name, :label => 'Last Name'

Now I want to be able to list or enter the relations in my "household" and I don't have a clue

tbrooke
  • 2,137
  • 2
  • 17
  • 25

1 Answers1

0

I changed this to a simpler arrangement of just having a household model with many neighbors and a neighbor model instead of a self referential arrangement of linking neighbors to neighbors via households

Sometimes simpler is better

tbrooke
  • 2,137
  • 2
  • 17
  • 25