Defect #1421

Load problem with acts_as_searchable

Added by Pierre Paysant-Le Roux over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:2008-06-10
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Search engine
Target version:0.8
Resolution:Fixed Affected version:

Description

Acts as searchable verify that the project_id and created_on columns exists when not providing project_key and date_column options in the model defined to be searchable.
When one of those options is not set, an error is raised when the corresponding column (or the entire table) doesn't exists by loading the model.

I think that loading time is not the right moment for doing this verification. None of the rails mechanisms prevent a model to be loaded because of missing column in the database.

This defect causes me problem during initial rake db:migrate when loading a conf that loads some models that are searchable.

Here is a patch that solves the problem.

patch_acts_as_searchable.patch Magnifier (1.59 KB) Pierre Paysant-Le Roux, 2008-06-10 21:56

Associated revisions

Revision 1682
Added by Jean-Philippe Lang over 9 years ago

Fixed: searchable model can't be loaded if table is not yet created (#1421).

History

#1 Updated by Jean-Philippe Lang over 9 years ago

  • Category set to Search engine
  • Status changed from New to Closed
  • Target version set to 0.8
  • Resolution set to Fixed

Fixed in r1682.

Also available in: Atom PDF