Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support Sunspot 1.3.0 #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

woodhull
Copy link

The latest version of Sunspot is required to use Sunspot with Rails 3.2.

Nathan

@justinko
Copy link
Owner

Thanks for the pull!

I am not a fan of alias_method in this context. Can you switch it to using modules? Something like this:

module RSolrClientExtension
  def adapt_response(request, response)
    if response[:status] == 401
      result = response[:body]
      result.extend Context
      result.request = request
      result.response = response
      return result
    else
      super
    end
  end
end

RSolr::Client.send(:include, RSolrClientExtension)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants