Skip to content

Table name prefix for join table #296

@mitfik

Description

@mitfik

Hi,

Is there any way to tell rolify to set prefix name for join table users_roles to have something like prefix_users_roles ?

As I can see in the source code you are using tableize on the role_cname:

https://github.com/RolifyCommunity/rolify/blob/master/lib/rolify.rb#L20

self.role_table_name = self.role_cname.tableize.gsub(/\//, "_")

which in my understanding will never resolve proper table name if we will set in ActiveRecord table_name_prefix.
Is that correct or I am missing something?

Please advise me how to set proper table_name_prefix for all tables used by rolify.
Thanks a lot

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