doesn't work in engines ? #88

Closed
alotela opened this Issue Jul 29, 2012 · 8 comments

Comments

Projects
None yet
6 participants

alotela commented Jul 29, 2012

Hi,

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

thanks.

rkgarg commented Sep 4, 2012

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

any solution/workaround ?

Collaborator

alexch commented Sep 4, 2012

Can you try the --model-dir option?

rkgarg commented Sep 5, 2012

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.

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?

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

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

@ctran ctran closed this Nov 30, 2013

Seriously? What commit closes this issue?

@ctran ctran added the released label Dec 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment