Skip to content

Best practice for extending Admin::User model #574

@mattr

Description

@mattr

The Admin::User model from Koi is not directly present in the generated application. This leads to potential issues if we need to extend the model for app-specific behaviour.

I see three main avenues for extending the model:

  1. Copy the model from Koi into the application wholesale;
  2. Extend the model in the application; or
  3. Extend the model via initializers.

Each option has benefits and drawbacks and may be suitable in different situations. For example, 3 might be a preferred approach if we are just adding a concern to the model. 1 is the simplest solution but 2 reduces the additional boilerplate.

We want to document our preferred approach(es) and in which situations they would be most applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions