Skip to content
  • Petrik's avatar
    c477d956
    Introduce ActiveModel::API · c477d956
    Petrik authored
    
    
    Currently `ActiveModel::Model` is defined as the minimum API to talk
    with Action Pack and Action View.
    Its name suggests it can be included to create Active Record type
    models, but for creating models it's probably too minimal. For example
    it's very common to include ActiveModel::Attributes as well.
    
    By moving `ActiveModel::Model`'s implementation to a new
    `ActiveModel::API` we keep a definition of the minimum API to talk with
    Action Pack and Action View.
    
    For `ActiveModel::Model` we only need to include `ActiveModel::API`.
    This will allow adding more funcationality to `ActiveModel::Model` while
    keeping backwards compatibility.
    
    Co-authored-by: default avatarNathaniel Watts <1141717+thewatts@users.noreply.github.com>
    c477d956
    Introduce ActiveModel::API
    Petrik authored
    
    
    Currently `ActiveModel::Model` is defined as the minimum API to talk
    with Action Pack and Action View.
    Its name suggests it can be included to create Active Record type
    models, but for creating models it's probably too minimal. For example
    it's very common to include ActiveModel::Attributes as well.
    
    By moving `ActiveModel::Model`'s implementation to a new
    `ActiveModel::API` we keep a definition of the minimum API to talk with
    Action Pack and Action View.
    
    For `ActiveModel::Model` we only need to include `ActiveModel::API`.
    This will allow adding more funcationality to `ActiveModel::Model` while
    keeping backwards compatibility.
    
    Co-authored-by: default avatarNathaniel Watts <1141717+thewatts@users.noreply.github.com>
Loading