Skip to content

How to handle JSONB columns on name-spaced tables? #49

@jackkinsella

Description

@jackkinsella

Here's the situation: Imagine you have a name-spaced table, e.g. admin_users, representing the model Admin::User, and this table has a JSONB column, say details.

The fixture_builder gem won't ever call serialized_value_if_needed. The key method is dump_tables in builder.rb, which calculates the class name with the following code:

   table_klass = table_name.classify.constantize rescue nil

The trace is as follows:

"admin_users".classify => "AdminUser" # should be "Admin::User"
"AdminUser".constantize => error 

Any ideas how to handle this?

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