0

I'm loading models through a gem, and I want to overload those models. I'm in Rails 3.

What is the best way to do this?

-= More Info =-

Ultimately, I want to run thinking_sphinx against a model in the gem so:

class User < ActiveRecord::Base
 define_index do
  indexes some_index
 end
end

This takes over the gem's model. If I place it into the initializers, it works once then it won't continue to work on any rails server, WEbrick, unicorn, but it works fine in the console.

Thanks in advanced, Justin

Justin
  • 631
  • 2
  • 7
  • 13

1 Answers1

0

This was my answer.

How to monkey-patch code that gets auto-loaded in Rails?

Community
  • 1
  • 1
Justin
  • 631
  • 2
  • 7
  • 13