Skip to content

Consider not directly including into everything #10

@jondavidjohn

Description

@jondavidjohn

First, this looks really useful!

I noticed you are including this module directly in every instance of ActiveRecord::Base and ActiveModel::Model. I understand your intention for it to be a global extension to these, but as a user I'd personally feel much better about simply including it in the models that need it.

class Book < ApplicationRecord
  include HumanAttributeValues

  ...
end

Does that make sense?

By including in every instance of ActiveRecord/Model, you're effectively making the decision for me that the public API of every model should be augmented, even when it's not necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions