annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

doesn't work in engines ?

Open alotela opened this issue 14 years ago • 8 comments

Hi,

is it me, or annotate doesn't work with engines models ?

thanks.

alotela avatar Jul 29 '12 10:07 alotela

Yep, It's not picking models/routs of Engines for me too..

any solution/workaround ?

rkgarg avatar Sep 04 '12 08:09 rkgarg

Can you try the --model-dir option?

alexch avatar Sep 04 '12 15:09 alexch

Tried that, but it doesn't pick tables for engine models.

For e.g. my engine model is

module Enginename class ModelName end end

having table name : engine_name_model_name

it is unable to identify those, thus doesn't annotates them.

however if I inherited on of my models in an engine, it annotated it. So it may be simply doing something like ModelName.table_name and not considering the module around which it is wrapped.

rkgarg avatar Sep 05 '12 06:09 rkgarg

I don't get it, this is my scenario:

I moved models into shared rails engine and now I want to update the annotations. I cd into the engines root folder and run bundle exec annotate nothing happens.

I've tried running bundle exec annotate --model-dir /absolute/path/to/rails/engine/app/models from many directories but it doesn't matter I still get Nothing annotated.. Any suggestions on how I might make it work?

mhenrixon avatar Aug 28 '13 15:08 mhenrixon

I tried this on an engine, models work but routes annotations doesn't.

morganchristiansson avatar Oct 31 '13 12:10 morganchristiansson

@morganchristiansson you can add my branch for a working version https://github.com/mhenrixon/annotate_models

mhenrixon avatar Oct 31 '13 12:10 mhenrixon

The fix is reverting one of the previous commits (https://github.com/mhenrixon/annotate_models/commit/92f2bec7005d3a2122aa04ec9361406d81e37b21)

mhenrixon avatar Oct 31 '13 12:10 mhenrixon

Seriously? What commit closes this issue?

mhenrixon avatar Nov 30 '13 09:11 mhenrixon