Solution for undefined method `sphinx_scope’
Running into undefined_method errors with Thinking Sphinx and sphinx scopes?
Make sure you define your sphinx_scope after the define_index block, instead of before.
Simple, huh?
In other words, make sure your ActiveRecord classes look like this:
class ContrivedExample < ActiveRecord::Base define_index do has :something end sphinx_scope(:something_cool) { :with => {:something => 10} } end
Possibly Related Posts:
- Manage Heroku on iPhone and iPad
- Plugins and Gems for Ruby on Rails that I’ve known and loved
- Capistrano, Rails and Nginx
