Skip to content
  • Sean Griffin's avatar
    4590d772
    Simplify the implementation of Active Model's type registry · 4590d772
    Sean Griffin authored
    Things like decorations, overrides, and priorities only matter for
    Active Record, so the Active Model registry can be implemented much more
    simply. At this point, I wonder if having Active Record's registry
    inherit from Active Model's is even worth the trouble?
    
    The Active Model class was also missing test cases, which have been
    backfilled.
    
    This removes the error when two types are registered with the same name,
    but given that Active Model is meant to be significantly more generic, I
    do not think this is an issue for now. If we want, we can raise an error
    at the point that someone tries to register it.
    4590d772
    Simplify the implementation of Active Model's type registry
    Sean Griffin authored
    Things like decorations, overrides, and priorities only matter for
    Active Record, so the Active Model registry can be implemented much more
    simply. At this point, I wonder if having Active Record's registry
    inherit from Active Model's is even worth the trouble?
    
    The Active Model class was also missing test cases, which have been
    backfilled.
    
    This removes the error when two types are registered with the same name,
    but given that Active Model is meant to be significantly more generic, I
    do not think this is an issue for now. If we want, we can raise an error
    at the point that someone tries to register it.
Loading