<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/rails_root/app/controllers/admin/users_controller.rb</filename>
    </added>
    <added>
      <filename>test/rails_root/app/views/admin/users/index.html.erb</filename>
    </added>
    <added>
      <filename>test/rails_root/test/functional/admin/users_controller_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -79,7 +79,7 @@ h2. View
   &lt;/table&gt;
 &lt;/code&gt;&lt;/pre&gt;
 
-sortable_table_header creates a table header containing a link with the correct :sort and :order params. It also has a class of &quot;ascending&quot; or &quot;descending&quot; so you can add styles with arrows.
+sortable_table_header creates a table header containing a link with the correct :sort and :order params. It also has a class of &quot;ascending&quot; or &quot;descending&quot; so you can add styles with arrows. You can add your own styles as well.
 
 h2. Example styles
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -62,7 +62,7 @@ module SortableTable
       if override
         model_name = override
       else
-        model_name = if attribute_includes_table?(attribute) 
+        model_name = if attribute_includes_table?(attribute)
           get_model_from_attribute(attribute)
         else
           get_model_under_test_from_test_name
@@ -72,7 +72,8 @@ module SortableTable
     end
     
     def get_model_under_test_from_test_name
-      model_name = self.name.gsub(/ControllerTest/, '')
+      model_name_from_test_name = self.name.gsub(/ControllerTest/, '')
+      remove_namespacing(model_name_from_test_name)
     end
     
     def attribute_includes_table?(attribute)
@@ -88,7 +89,12 @@ module SortableTable
     end
 
     def remove_namespacing(string)
-      string.slice!(0..string.rindex('/')) if string.include?('/')
+      while string.include?('/')
+        string.slice!(0..string.rindex('/')) 
+      end
+      while string.include?('::')
+        string.slice!(0..string.rindex('::')+1) 
+      end
       string
     end
     </diff>
      <filename>shoulda_macros/sortable_table.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,9 @@
 ActionController::Routing::Routes.draw do |map|
   map.resources :users
+  
+  map.namespace :admin do |admin|
+    admin.resources :users
+  end
 
   map.connect ':controller/:action/:id'
   map.connect ':controller/:action/:id.:format'</diff>
      <filename>test/rails_root/config/routes.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>16b6c68c681b611cdcb4cd56c0c14df50410e799</id>
    </parent>
  </parents>
  <author>
    <name>Dan Croak</name>
    <email>dcroak@thoughtbot.com</email>
  </author>
  <url>http://github.com/thoughtbot/sortable_table/commit/a33df1e2b67dbef84fb37d4f81895c7a7f618970</url>
  <id>a33df1e2b67dbef84fb37d4f81895c7a7f618970</id>
  <committed-date>2009-01-02T16:22:54-08:00</committed-date>
  <authored-date>2009-01-02T16:22:54-08:00</authored-date>
  <message>fixed namespacing bug, added tests for namespacing</message>
  <tree>29f0942bdd6ebb0078ded43a8e209e7c842e0140</tree>
  <committer>
    <name>Dan Croak</name>
    <email>dcroak@thoughtbot.com</email>
  </committer>
</commit>
