Skip to content

Support namespaced models #22

@jbigler

Description

@jbigler

When using a namespaced model such as:

module Accounts
  class User < ApplicationRecord
    self.ignored_columns += "old_name"
 end
end

rubocop-migration continues to give me an error if I try to run remove_column :accounts_users, :old_name

Note: the module has a table name prefix defined:

module Accounts
  def self.table_name_prefix
    "accounts_"
  end
end

P.S. I have no errors when using remove in change_table blocks, but I think they are not being detected at all, because they never seem to produce errors.

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