Is there any way to index if there isn't any existing data for a
polymorphic join? If I'd like to deploy an application with no data
but that is set up for indexing.
On Oct 13, 6:53 am, Pat Allan <
p...@freelancing-gods.com> wrote:
> You should be able to referencepolymorphicjoins normally - provided
> there is existing data there so Thinking Sphinx can figure out that
> creditable can refer to Item.
>
> indexes creditable(:name), :as => :credit_name
> indexes creditable.keywords, :as => :keywords
> indexes creditable.description, :as => :description
> indexes creditable.manufacturer, :as => :manufacturer
>
> If this doesn't work, let me know what the errors are, and we can work
> through it.
>
> Cheers
>
> --
> Pat
>
> On 12/10/2009, at 3:53 PM, puls wrote:
>
>
>
> > class Credit < ActiveRecord::Base
> > belongs_to :creditable, :polymorphic=> true