rajesh's blog

Updating additional data fields in has and belongs to many relationship

Updating additional data fields in has and belongs to many relationship


It's always been problem to update additional fields in HABTM tables.
Unfortunately rails have no direct support to update fields. I have written patch to update those fields in HABTM additional fields.
The code snippet and example are given below:

We have following models with HABTM relationship

Avoid NoMemoryError during model reindex with ferret in ruby on rails

Untitled Document

Avoid NoMemoryError during model reindex with ferret in ruby on rails

When Ferret is used and we want to rebuild index via console, sometime we get following error:

NoMemoryError (failed to allocate memory)

This problem mostly comes on shared server where we have limited memory space.

To get ride of this issue we have to make following test to ensure batch size of rebuilding index

Syndicate content