def create_versions_class
      versions_table_name = self.versions_table_name

      self.const_set self.versions_class_name, Class.new(ActiveRecord::Base)

      self.versions_class.class_eval do
        self.table_name = versions_table_name

        # Whitelist public attributes
        # Everything since this class is for internal use only
        public_attributes = self.column_names.reject{|attr| self.protected_attributes.deny?(attr)}
        self.attr_accessible(*public_attributes)
      end
    end
def create_versions_class
      versions_table_name = self.versions_table_name

      self.const_set self.versions_class_name, Class.new(ActiveRecord::Base)

      self.versions_class.class_eval do
        self.table_name = versions_table_name

        # Whitelist public attributes
        # Everything since this class is for internal use only
        public_attributes = self.column_names.reject{|attr| self.protected_attributes.deny?(attr)}
        self.attr_accessible(*public_attributes)
      end
    end
create a class