Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-430

Fixes to preserve proper inheritance for fields and modules

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I've replicated the way ActiveModel generates attributes methods in a module, for fields. This allows you to override a field method and still use super to go up the chain. It removes the need for any alias_method_chain action.

      Also corrected the way you have used ActiveSupport::Concern. If other developers need to extend the mongoid api for one-off use or a plugin, then this change makes it easier. It allows a developer to just include a new module into Mongoid::Document and it will preserve the inheritance chain, putting the developer's module first.

      Great work on Mongoid btw.

            Assignee:
            Unassigned Unassigned
            Reporter:
            adzap Adam Meehan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: