title: How do I create a controller and action without a model?
body: <p>I have several models:</p>
  
  <ul>
  <li>Email</li>
  <li>Letter</li>
  <li>Call</li>
  </ul>
  
  <p>All three belong to a model Campaign.  And a Campaign has_many Contacts</p>
  
  <p>I envision being able to see a schedule for Today by going to domain/schedule/today</p>
  
  <p>What I'd like it to do would be to show all the Events (Email, Letter, Call) that have to happen today for each campaign.</p>
  
  <p>I tried the following, but have some challenges in putting it into a controller versus into a View.  There are many emails in campaign.</p>
  
  <p>Email.days is the number of days from the contact.start_date that an email should be sent to the Contact.</p>
  
  <pre><code>ScheduleController &lt; 
  
  def index
  
     campaigns.each do |campaign| #goes through each campaign
  
        for contacts in campaign.contacts
  
           Email.find(:all).reject { |email| email.contact.start_date + email.days &lt;= Date.now }
  
  
        end
     end
  
  end
  </code></pre>