Class A and B are identical:
class A < ActiveRecord::Base
def foo
puts \"foo\"
end
end
class B < ActiveRecord::Base
def foo
puts \"foo\"
end
end
<
You have more flexibility with the module. The module's intent is to span across different types of classes. With the other method you are locking yourself into Base. Other than that, there isn't much difference.
Ruby's answer to multiple inheritance is mixins. Since your classes are already inheriting from Rails specific classes, they can no longer inherit from your custom classes.
So your choice is to chain together in a long chain, or use a mixin which is much cleaner, and easier to understand.