<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>history.txt</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -7,21 +7,18 @@ module PagedScopes
         resources_without_paged(*(entities.dup &lt;&lt; options), &amp;block)        
         
         paged_options = {} unless paged_options.is_a? Hash
-        
         paged_as = paged_options.delete(:as)
         paged_name = paged_options.delete(:name)
         
         if paged_options.empty?
-          if (options[:only] &amp;&amp; options[:only].include?(:index)) || !(options[:except] &amp;&amp; options[:except].include?(:index))
-            paged_options.merge! :index =&gt; true
+          unless (options[:only] &amp;&amp; ![ options[:only] ].flatten.include?(:index)) || (options[:except] &amp;&amp; [ options[:except] ].flatten.include?(:index))
+            paged_options[:index] = true
           end
-          
           options[:collection].each { |collection, methods| paged_options[collection] = true if [ methods ].flatten.include? :get } if options[:collection]
         end
 
         paged_options.each_pair do |action, page_options|
           page_options = {} unless page_options.is_a? Hash
-          
           page_options.reverse_merge! :name =&gt; paged_name unless paged_name.blank?
           page_options.reverse_merge! :as =&gt; paged_as unless paged_as.blank?
           page_options.merge! :only =&gt; :none</diff>
      <filename>lib/paged_scopes/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,16 @@ describe &quot;Resources&quot; do
     drawing_routes { |map| map.resources :articles, :paged =&gt; true }.should change { number_of_routes }.by(7+1)
   end
   
+  it &quot;should not add a paged index route if the index action is excluded by an :only option&quot; do
+    drawing_routes { |map| map.resources :articles, :paged =&gt; true, :only =&gt; :show }.should change { number_of_routes }.by(1+0)
+    drawing_routes { |map| map.resources :memberships, :paged =&gt; true, :only =&gt; [ :show, :edit ] }.should change { number_of_routes }.by(2+0)
+  end
+  
+  it &quot;should not add a paged index route if the index action is excluded by an :except option&quot; do
+    drawing_routes { |map| map.resources :articles, :paged =&gt; true, :except =&gt; :index }.should change { number_of_routes }.by(6+0)
+    drawing_routes { |map| map.resources :memberships, :paged =&gt; true, :except =&gt; [ :index, :new ] }.should change { number_of_routes }.by(5+0)
+  end
+  
   context &quot;with a :paged options&quot; do    
     it &quot;should map a paged index route for GET only&quot; do
       draw_routes { |map| map.resources :articles, :paged =&gt; true }</diff>
      <filename>spec/resources_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2e00d25e94a3190c22428257ce7d5a678a483d61</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Hollingworth</name>
    <email>mdholling@gmail.com</email>
  </author>
  <url>http://github.com/mholling/paged_scopes/commit/0292df4dcf3675c85bbbed662c1053796e01b3fd</url>
  <id>0292df4dcf3675c85bbbed662c1053796e01b3fd</id>
  <committed-date>2009-10-22T17:01:04-07:00</committed-date>
  <authored-date>2009-10-22T17:01:04-07:00</authored-date>
  <message>Fixed bug in which :only and :except options for paged resource routes weren't observed properly.</message>
  <tree>de4d37579b193910b9ff432fcb3a85c79187e09e</tree>
  <committer>
    <name>Matthew Hollingworth</name>
    <email>mdholling@gmail.com</email>
  </committer>
</commit>
