Skip to content

Update to support Sunspot 1.3.0 #2

Open
wants to merge 4 commits into from

3 participants

@woodhull

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

Nathan

@justinko
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
Something went wrong with that request. Please try again.