Skip to content

Is it time to redefine the purpose of ActiveHash? #234

@kbrock

Description

@kbrock

Has the purpose of ActiveHash changed?

Many of the recent feature requests feel like it is going towards an in-memory thread safe transactional database.

README.md [ref]

ActiveHash is a simple base class that allows you to use a ruby hash as a readonly datasource for an ActiveRecord-like model.

I read that ActiveHash is an alternative to storing reference data in the database or in constants.

ActiveHash assumes that every hash has an :id key, which is what you would probably store in a database. This allows you to seamlessly upgrade from ActiveHash objects to full ActiveRecord objects without having to change any code in your app, or any foreign keys in your database.

It even has a suggested migration plan for when requirements change and data is no longer read only. Then it suggests migrating the model to the standard SQL datastore. (or sqlite with ":memory:")

Question

I don't feel that this library and the definition of this library match.

Is it time to re-evaluate the use cases for this library?
Hopefully update the statement at the top of README.md?

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