title: paginate_alphabetically gem: Pagination links in namespace not working
body: <p>I have an admin namespace in a rails 3.2 app. I want to paginate a postgres database of authors, using the paginate_alphabetically gem at <a href="https://github.com/edendevelopment/paginate_alphabetically" rel="nofollow">https://github.com/edendevelopment/paginate_alphabetically</a> . </p>
  
  <p>The controller in app/controllers/admin (class Admin::AuthorsController &lt; AdminController ) has:</p>
  
  <pre><code>def index
      @authors = Author.includes(:stories).alphabetical_group(params[:letter])
      respond_to do |format|
          format.html # show.html.erb
          format.json { render json: @authors }
      end
  end
  </code></pre>
  
  <p>The author.rb model in app/models has:
  paginate_alphabetically :by => :last_name</p>
  
  <p>And the authors view in app/views/admin/index.html.erb has:</p>
  
  <pre><code>&lt;ul class='pagination'&gt;
  &lt;%- Author.pagination_letters.each do |letter| -%&gt;
  &lt;li&gt;&lt;%= link_to(letter, admin_authors_path(:letter =&gt; letter)) %&gt;&lt;/li&gt;
  &lt;%- end -%&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>This seems to be generating the correct html, with: </p>
  
  <pre><code>&lt;ul class='pagination'&gt;
  &lt;li&gt;&lt;a href="/admin/authors?letter=A"&gt;A&lt;/a&gt;&lt;/li&gt; 
  ...etc.
  &lt;/ul&gt;
  </code></pre>
  
  <p>But the links don't go anywhere when clicked. The ruby output says the following:</p>
  
  <pre><code>Started GET "/admin/authors?letter=A" for 127.0.0.1 at 2012-08-14 18:18:15 -0400
  Processing by Admin::AuthorsController#index as JS
  Parameters: {"letter"=&gt;"A", "collection"=&gt;{"list"=&gt;:get}}
  Author Load (1.8ms)  SELECT "authors".* FROM "authors" 
  Author Load (0.7ms)  SELECT "authors".* FROM "authors" WHERE (LOWER(last_name) LIKE     
  'a%') ORDER BY last_name
  Story Load (0.6ms)  SELECT "stories".* FROM "stories" INNER JOIN "authors_stories" ON   
  "stories"."id" = "authors_stories"."story_id" WHERE "authors_stories"."author_id" = 1
  Story Load (0.8ms)  SELECT "stories".* FROM "stories" INNER JOIN "authors_stories" ON "stories"."id" = "authors_stories"."story_id" WHERE "authors_stories"."author_id" = 2
   Story Load (67.1ms)  SELECT "stories".* FROM "stories" INNER JOIN "authors_stories" ON "stories"."id" = "authors_stories"."story_id" WHERE "authors_stories"."author_id" = 3
   Story Load (1.1ms)  SELECT "stories".* FROM "stories" INNER JOIN "authors_stories" ON "stories"."id" = "authors_stories"."story_id" WHERE "authors_stories"."author_id" = 4
   Story Load (1.2ms)  SELECT "stories".* FROM "stories" INNER JOIN "authors_stories" ON "stories"."id" = "authors_stories"."story_id" WHERE "authors_stories"."author_id" = 5
   Rendered admin/authors/_authors.html.erb (131.6ms)
   Rendered admin/authors/index.html.erb within layouts/admin (149.5ms)
  </code></pre>
  
  <p>Completed 200 OK in 171ms (Views: 96.4ms | ActiveRecord: 73.3ms)</p>
  
  <p>When I physically enter the url localhost:3000/admin/authors?letter=A (or any other letter), I get a page with what I want, a list of alphabetized authors depending on the letter. It just doesn't work with the above mentioned links. </p>
  
  <p>In my routes.rb file I have:</p>
  
  <pre><code>namespace :admin do
    resources :authors
    resources :issues
    resources :stories  
    root :to =&gt; 'authors#index
  end
  </code></pre>
  
  <p>Thoughts?</p>