title: new to rails : relationships not setup right?
body: <p>Right now I have some functionality working but its really ugly and I know there's a better way to do it. </p>
  
  <p>Here's what I have right now in my User model:</p>
  
  <pre><code>def attending
  dayseventsusers=self.days_events_users
  daysevents=Array.new
  events=Array.new
  
  dayseventsusers.each do |deu| 
    daysevents&lt;&lt;DaysEvent.find(deu['days_events_id'])
  end
  
  daysevents.each do |de|
    events&lt;&lt;Event.find(de['event_id'])
  end
  
  return events
  end
  </code></pre>
  
  <p>I'm trying to get a list of events for a certain group of dayseventsusers records but I have to move through several relationships to accomplish this. What I'd really like to do is something like self.days_events_users.days_event.event, but I don't know if it can be this simple assuming my relationships are setup correctly. </p>
  
  <pre><code>User model
  has_many :days_events_users
  
  DaysEventsUsers model
  belongs_to :user
  belongs_to :days_event
  
  DaysEvent
  has_many :days_events_users
  belongs_to :event
  </code></pre>
  
  <p>The days_events_users object belong to a single days_event, which belongs to a single event. Any suggestions are welcome!</p>