I want to create a multiple inheritance for a model.
in order to do that, I tried something like:
class User < ActiveRecord::Base, Devise::SessionsController
what is the way to do that correctly? I think my Syntax is not correct.
Ruby doesn't support multiple inheritance. To share functionality between models, you want to use mixins. Check out this article, particularly the section on mixins.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With