Looks like acts_as_solr maintains a list of classes that have called
"acts_as_solr"; it should be accessible here:

ActsAsSolr::Post.indexed_classes

Of course in order for it to be in there, the model would have to have been
loaded.  So depending on where you're doing this, you might need to
explicitly load all the models first:

Dir["app/models/**/*.rb"].each {|f| require f }

- Ben


On Thu, Dec 16, 2010 at 9:27 AM, Glenn Little <[email protected]> wrote:

> In particular, I'm wondering if there's an easy way in a rails app to
> get a list of all model classes that have "acts_as_solr" defined in
> them.  I can do a "grep -r" in my models directory and stuff the
> results into a list after proper capitalization/munging, but I'd like
> to do this programmatically, self-contained in the app itself.
>
> Thanks...
>
> -glenn
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby
>

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to