#66 ✓invalid

Model.disable_ferret in environment.rb does not work in development mode

Reported by Jens | February 13th, 2010 @ 12:39 AM

the reason is automatic model class reloading, which lets aaf forget about being disabled. Maybe introduce a config mechanism like rails has, and let aaf read the status of the disabled flag from there.

Workaround for the time being: add a before_filter that's only active in dev env to call disable_ferret before every request:

before_filter :disable_ferret if RAILS_ENV == 'development'

def disable_ferret

Comments and changes to this ticket

  • Jens

    Jens September 14th, 2010 @ 06:21 PM

    • State changed from “open” to “invalid”
    • Milestone order changed from “0” to “0”

    you could also add that statement to your model class directly, or even prepend the acts_as_ferret call with
    unless RAILS_ENV=='development'

    Using config/aaf.rb instead of declaring acts_as_ferret inside the model also makes it easy to only configure aaf for some Rails envs.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket