active_record-annotate icon indicating copy to clipboard operation
active_record-annotate copied to clipboard

Does not work with models with `.` in table name

Open westonganger opened this issue 6 years ago • 0 comments

In some of my Rails apps I connect to multiple databases. In that way I define my models like so:

class Project < OtherDatabaseModels
  self.table_name = "other_db.projects"
end

It is outputting the following error in the file after running the annotations

# Could not dump table "other_db.projects" because of following NoMethodError
#   undefined method `[]' for nil:NilClass

The error is for having the . in the table name. Its not related not to using the second database.

westonganger avatar Jan 29 '19 17:01 westonganger