To edit pages or tickets please login with username/password: aaf/aaf

Ticket #215 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

Use Rails' after_initialize and to_prepare callbacks in init.rb

Reported by: aaf Assigned to: jk
Priority: major Milestone:
Component: 0plugin Version:
Keywords: Cc:

Description

Attached is a patch that replaces the new AafLoader? with config callbacks in init.rb

config.after_initialize { ActsAsFerret::load_config }
config.to_prepare       { ActsAsFerret::load_config }

{{{#to_prepare}}} is called before each request in development mode, or before the initial request in production.

This is a lot cleaner and "Just Works". Now all people need to do is defined their shared indexes in config/aaf.rb

Attachments

aaf_init.patch (2.2 kB) - added by aaf on 04/29/08 13:25:10.

Change History

04/29/08 13:25:10 changed by aaf

  • attachment aaf_init.patch added.

04/30/08 12:14:38 changed by admin

  • status changed from new to closed.
  • resolution set to fixed.

Great, I've been looking *exactly* for something like this but wasn't aware I had access to config in init.rb.

Patch applied, Thanks!

To edit pages or tickets please login with username/password: aaf/aaf