Skip to content

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