Inheritance behavior is really weird!?

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 2.1.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I have a User class at the base.
      Customer inherits from User.
      Then Customer::Private inherits from Customer and embeds a :person (Person class).

      Now If I create a new User it complains that I don't have a #person method. I can only make it work like this:

      <pre>
      class User
      include Mongoid::Document

      def person *args
      end

      def company *args
      end
      end
      </pre>

      Why I need these getter methods and with multiple args is beyond me! Seems like it requires the superclass as a kind of Interface!?

              Assignee:
              Unassigned
              Reporter:
              Kristian Mandrup
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: