Skip to content
  • Sean Doyle's avatar
    ca921395
    Make `ActiveModel::Serialization#read_attribute_for_serialization` public · ca921395
    Sean Doyle authored
    Despite the `#read_attribute_for_serialization` method being declared as
    `private`, the module-level `ActiveModel::Serialization` documentation
    mentions it explicitly by name.
    
    Mentioning the method directly and encouraging classes to override it to
    customize behavior breaks Rails existing `public`-`private` interface
    convention.
    
    This commit promotes the method to `public` visibility.
    ca921395
    Make `ActiveModel::Serialization#read_attribute_for_serialization` public
    Sean Doyle authored
    Despite the `#read_attribute_for_serialization` method being declared as
    `private`, the module-level `ActiveModel::Serialization` documentation
    mentions it explicitly by name.
    
    Mentioning the method directly and encouraging classes to override it to
    customize behavior breaks Rails existing `public`-`private` interface
    convention.
    
    This commit promotes the method to `public` visibility.
Loading