title: missing required keys, when linking
body: <p>So, I have an applicaton that has Movie studios, Films, and Clips. Each Studio, has an associated film, and each film has associated clips. This content is uploaded solely by the admin of the website. Now, users are able to view various clips from films, and each time a clip is viewed by a user, an "impression" is created. I'm using the impressionist gem to track views on each clip. This ties into my next point.</p>
  
  <p>In the admin backend I'd like to allow the admin to select a clip and choose a date range and then when they click filter it will display all of the users who viewed the clip in that given range. </p>
  
  <p>I have this working in a table format, however, I'm un-able to display a link to the actual film or clip, I was able to display a link to the Studio with np.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>&lt;% if @impressions %&gt;
  &lt;table&gt;
    &lt;tr&gt;
      &lt;th&gt;Studio&lt;/th&gt;
      &lt;th&gt;Film&lt;/th&gt;
      &lt;th&gt;Clip&lt;/th&gt;
  
    &lt;/tr&gt;
  &lt;% @impressions.each do |impression| -%&gt;
  &lt;% @clip = Clip.where(id: impression.impressionable_id).first %&gt;
  &lt;% @user = User.where(id: impression.user_id).first %&gt;
  
      &lt;tr&gt;
      &lt;th&gt;
      &lt;%= link_to @clip.film.studio.name,  saas_admin_studio_path(@clip.film.studio) %&gt; &lt; --- works fine!
      &lt;/th&gt;
      &lt;th&gt;
      &lt;%= link_to @clip.film.name, saas_admin_studio_film_path(@clip.film) %&gt; &lt;--- doesn't work (see error #1)
      &lt;/th&gt;
      &lt;th&gt;
      &lt;%=  link_to @clip.name, saas_admin_studio_film_clips_path(@clip) %&gt; &lt;--- doesn't work (see error #2)
      &lt;/th&gt;
  &lt;% end -%&gt;
  &lt;% end -%&gt;
  </code></pre>
  
  <p><strong>Error #1</strong>:</p>
  
  <pre><code>ActionController::UrlGenerationError in SaasAdmin::Statistics#search
  Showing /Users/me/Sites/multi/app/views/saas_admin/statistics/index.html.erb where line #58 raised:
  
  No route matches {:action=&gt;"show", :controller=&gt;"saas_admin/films", :format=&gt;nil, :id=&gt;nil, :studio_id=&gt;#&lt;Film id: 5, name: "blab", sort_name: "blab", description: "&lt;p&gt;bla&lt;/p&gt;", short_description: "bla", meta_data: "bla", studio_id: 4, active: true, trackable: true, regions: nil, created_at: "2014-07-25 01:21:48", updated_at: "2014-07-25 01:21:48", poster_file_name: "ABeautifulMind-ManySolutions.png", poster_content_type: "image/png", poster_file_size: 331462, poster_updated_at: "2014-07-25 01:21:46", permalink: "blab", amazon_link: ""&gt;} missing required keys: [:id]
  </code></pre>
  
  <p><strong>Error #2</strong>:</p>
  
  <pre><code>    ActionController::UrlGenerationError in SaasAdmin::Statistics#search
  Showing /Users/me/Sites/multi/app/views/saas_admin/statistics/index.html.erb where line #60 raised:
  
  No route matches {:action=&gt;"index", :controller=&gt;"saas_admin/clips", :film_id=&gt;nil, :format=&gt;nil, :studio_id=&gt;#&lt;Clip id: 1, name: "test", sort_name: "test", permalink: "test", description: "&lt;p&gt;test&lt;/p&gt;", duration: nil, film_id: 5, active: true, trackable: true, view_count: nil, status: nil, thumbnail_remote_file: "", created_at: "2014-07-25 01:22:12", updated_at: "2014-07-25 01:22:12", thumbnail_file_name: "ABeautifulMind-ManySolutions.png", thumbnail_content_type: "image/png", thumbnail_file_size: 331462, thumbnail_updated_at: "2014-07-25 01:22:11", impressions_count: 5, position: 1&gt;} missing required keys: [:film_id]
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks!</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>Studio.rb:</p>
  
  <pre><code>class Studio &lt; ActiveRecord::Base
  
    # attr_accessible :name, :code, :active, :trackable
    after_save ThinkingSphinx::RealTime.callback_for(:studio)
  
    has_many :films, :dependent =&gt; :destroy
    has_many :clips, :through =&gt; :films
  
  end
  </code></pre>
  
  <p>Film.rb:</p>
  
  <pre><code>class Film &lt; ActiveRecord::Base
    after_save ThinkingSphinx::RealTime.callback_for(:film)
  
    belongs_to :studio
    has_many :clips, :dependent =&gt; :destroy
    has_many :film_countries
    has_many :countries, :through =&gt; :film_countries, :source =&gt; :fcountry
   end
  </code></pre>
  
  <p>Clip.rb: </p>
  
  <pre><code>class Clip &lt; ActiveRecord::Base
    after_save ThinkingSphinx::RealTime.callback_for(:clip)
  
    is_impressionable :counter_cache =&gt; true, :unique =&gt; :request_hash
  
    the impressionist gem is tracking all of the views for us. And what do u want to render ?
  
    a list of results, between the two dates of  usofe rwhat of users who viewed the clip u selected
  
    belongs_to :film
    has_one :video, :dependent =&gt; :destroy
    has_many :playlist_item
   end
  </code></pre>
  
  <p><strong>Edit 2:</strong></p>
  
  <p>Routes:</p>
  
  <pre><code>sort_saas_admin_studio_film_clips POST     /admin/content/studios/:studio_id/films/:film_id/clips/sort(.:format)     saas_admin/clips#sort
         saas_admin_studio_film_clips GET      /admin/content/studios/:studio_id/films/:film_id/clips(.:format)          saas_admin/clips#index
                                      POST     /admin/content/studios/:studio_id/films/:film_id/clips(.:format)          saas_admin/clips#create
      new_saas_admin_studio_film_clip GET      /admin/content/studios/:studio_id/films/:film_id/clips/new(.:format)      saas_admin/clips#new
     edit_saas_admin_studio_film_clip GET      /admin/content/studios/:studio_id/films/:film_id/clips/:id/edit(.:format) saas_admin/clips#edit
          saas_admin_studio_film_clip GET      /admin/content/studios/:studio_id/films/:film_id/clips/:id(.:format)      saas_admin/clips#show
                                      PATCH    /admin/content/studios/:studio_id/films/:film_id/clips/:id(.:format)      saas_admin/clips#update
                                      PUT      /admin/content/studios/:studio_id/films/:film_id/clips/:id(.:format)      saas_admin/clips#update
                                      DELETE   /admin/content/studios/:studio_id/films/:film_id/clips/:id(.:format)      saas_admin/clips#destroy
              saas_admin_studio_films GET      /admin/content/studios/:studio_id/films(.:format)                         saas_admin/films#index
                                      POST     /admin/content/studios/:studio_id/films(.:format)                         saas_admin/films#create
           new_saas_admin_studio_film GET      /admin/content/studios/:studio_id/films/new(.:format)                     saas_admin/films#new
          edit_saas_admin_studio_film GET      /admin/content/studios/:studio_id/films/:id/edit(.:format)                saas_admin/films#edit
               saas_admin_studio_film GET      /admin/content/studios/:studio_id/films/:id(.:format)                     saas_admin/films#show
                                      PATCH    /admin/content/studios/:studio_id/films/:id(.:format)                     saas_admin/films#update
                                      PUT      /admin/content/studios/:studio_id/films/:id(.:format)                     saas_admin/films#update
                                      DELETE   /admin/content/studios/:studio_id/films/:id(.:format)                     saas_admin/films#destroy
                   saas_admin_studios GET      /admin/content/studios(.:format)                                          saas_admin/studios#index
                                      POST     /admin/content/studios(.:format)                                          saas_admin/studios#create
                new_saas_admin_studio GET      /admin/content/studios/new(.:format)                                      saas_admin/studios#new
               edit_saas_admin_studio GET      /admin/content/studios/:id/edit(.:format)                                 saas_admin/studios#edit
                    saas_admin_studio GET      /admin/content/studios/:id(.:format)                                      saas_admin/studios#show
                                      PATCH    /admin/content/studios/:id(.:format)                                      saas_admin/studios#update
                                      PUT      /admin/content/studios/:id(.:format)                                      saas_admin/studios#update
                                      DELETE   /admin/content/studios/:id(.:format)                                      saas_admin/studios#destroy
  </code></pre>