Skip to content


Annotate fails when is used module table_name_prefix #92

radeno opened this Issue · 2 comments

4 participants



annotable_models are very handy and easy to use gem (maybe rake task will be easier because have list [rake -T]).

This issue is about that it really great works on "standard" models but not on models within namespace and defined with table_name_prefix.

for example:

module Order
  def self.table_name_prefix

and nested model

module Order
  class Item < ActiveRecord::Base

Annotate models search in table items which not exists and right is order_items


I have the same issue. I happen to have two models, one named Question and another named Exam::Question, and they use the questions and exam_questions tables, respectively. However, Exam::Question gets annotated with the columns from the questions table.

Edit: Sorry, that wasn't exactly right. The model files are okay, test/unit/exam/question_test.rb is the file that gets annotated incorrectly. No matter how many times I run annotate, it keeps saying: Annotated (2): Exam::Question, Question

@ctran ctran closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.