<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -59,7 +59,9 @@ class Trip
   #   # Options for remixer
   #   # -------------------
   #   # Set the specified alias (Symbol) on the 'comments' association
-  #   :as        =&gt; nil
+  #   :as         =&gt; nil,
+  #   # class_name to use for the generated remixed model
+  #   :class_name =&gt; &quot;#{self}Comment&quot;
   # }.merge(options)
   
   is :commentable #, options</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -53,22 +53,29 @@ module DataMapper
         include InstanceMethods
         
         options = {
-          :commenter =&gt; { :name =&gt; :user_id, :type =&gt; Integer },
-          :body      =&gt; { :type =&gt; DataMapper::Types::Text, :nullable =&gt; false },
-          :rateable  =&gt; false,
-          :as        =&gt; nil
+          :commenter  =&gt; { :name =&gt; :user_id, :type =&gt; Integer },
+          :body       =&gt; { :type =&gt; DataMapper::Types::Text, :nullable =&gt; false },
+          :rateable   =&gt; false,
+          :as         =&gt; nil,
+          :class_name =&gt; &quot;#{self}Comment&quot;
         }.merge(options)
         
         # allow non togglable ratings
         @comments_rateable = options[:rateable]
         
-        remix n, Comment, :as =&gt; options[:as]
+        @commentable_class_name = options[:class_name]        
+        class_inheritable_accessor :commentable_class_name        
+        
+        @commentable_key = @commentable_class_name.snake_case.to_sym     
+        class_inheritable_accessor :commentable_key
+        
+        remix n, Comment, :as =&gt; options[:as], :class_name =&gt; @commentable_class_name
         
         @remixed_comment = remixables[:comment]
         class_inheritable_reader :remixed_comment
 
         self.class_eval(&lt;&lt;-EOS, __FILE__, __LINE__ + 1)
-          alias :comments #{@remixed_comment[:reader]}
+          alias :comments #{@remixed_comment[commentable_key][:reader]}
         EOS
 
         def commenter_fk(name)
@@ -89,7 +96,7 @@ module DataMapper
         # block for enhance gets class_eval'ed in remixable scope
         commenting_rateable = self.commenting_rateable?
         
-        enhance :comment do
+        enhance :comment, @commentable_class_name do
           
           property c_name, c_type, c_property_opts # commenter
           property b_name, b_type, b_property_opts # body</diff>
      <filename>lib/dm-is-commentable/is/commentable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -82,10 +82,19 @@ if HAS_SQLITE3 || HAS_MYSQL || HAS_POSTGRES
         lambda { TripComment.auto_migrate! }.should_not raise_error
       end
       
+      it &quot;should define a 'commentable_class_name' class_level reader on the remixing model&quot; do
+        Trip.respond_to?(:commentable_class_name).should be_true
+        Trip.commentable_class_name.should == &quot;TripComment&quot;
+      end
+                  
+      it &quot;should define a 'commentable_key' class_level reader on the remixing model&quot; do
+        Trip.respond_to?(:commentable_key).should be_true
+        Trip.commentable_key.should == :trip_comment
+      end
       
       it &quot;should define a 'remixed_comment' class_level reader on the remixing model&quot; do
         Trip.respond_to?(:remixed_comment).should be_true
-        Trip.remixed_comment[:model].should == TripComment
+        Trip.remixed_comment[Trip.commentable_key][:model].should == TripComment
       end
       
       it &quot;should define a 'commenting_togglable?' class_level reader on the remixing model&quot; do
@@ -182,8 +191,8 @@ if HAS_SQLITE3 || HAS_MYSQL || HAS_POSTGRES
 
       it &quot;should set the specified alias on the 'comments' reader&quot; do
         @t1.respond_to?(:my_trip_comments).should be_true
-        Trip.remixed_comment[:reader].should == :my_trip_comments
-        Trip.remixed_comment[:writer].should == :my_trip_comments=
+        Trip.remixed_comment[Trip.commentable_key][:reader].should == :my_trip_comments
+        Trip.remixed_comment[Trip.commentable_key][:writer].should == :my_trip_comments=
       end
 
     end
@@ -192,8 +201,8 @@ if HAS_SQLITE3 || HAS_MYSQL || HAS_POSTGRES
 
       it &quot;should set the specified alias on the 'comments' reader&quot; do
         @t1.respond_to?(:trip_comments).should be_true
-        Trip.remixed_comment[:reader].should == :trip_comments
-        Trip.remixed_comment[:writer].should == :trip_comments=
+        Trip.remixed_comment[Trip.commentable_key][:reader].should == :trip_comments
+        Trip.remixed_comment[Trip.commentable_key][:writer].should == :trip_comments=
       end
 
     end</diff>
      <filename>spec/integration/commentable_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2b511e6dcd63d750f6c0315b9f70aa79f2a010c6</id>
    </parent>
  </parents>
  <author>
    <name>Martin Gamsjaeger</name>
    <email>gamsnjaga@gmail.com</email>
  </author>
  <url>http://github.com/snusnu/dm-is-commentable/commit/d827713916be6fb13f5a5b5301f2b8aa8ad2737a</url>
  <id>d827713916be6fb13f5a5b5301f2b8aa8ad2737a</id>
  <committed-date>2008-10-22T07:36:11-07:00</committed-date>
  <authored-date>2008-10-22T07:36:11-07:00</authored-date>
  <message>Make dm-is-commentable dm-more 0.9.7 compliant.</message>
  <tree>476e3d9d4fc9e5e2662c14154717e299a76478a6</tree>
  <committer>
    <name>Martin Gamsjaeger</name>
    <email>gamsnjaga@gmail.com</email>
  </committer>
</commit>
