Hi all,
This is my first post to this board, and I'd like to start by issuing
a huge thanks to everyone working on this library. I love it!
I admit that I ran into the issue described in Dmitriy's post. After
some digging, I found a note in Sunspot#search indicating to pass an
arg to the block, so my searches look like:
Sunspot.search(Article) do |query|
query.keywords params[:query]
end
This solves the problem, but at the expense of the elegance of
Sunspot's DSL. Dmitriy's solution makes sense in reading it over,
though I haven't played with it yet. As for the potential
method_missing errors -- how about wrapping it in a custom
Sunspot::NoMethodInContextError "Unable to find #{method_name} in #
{@context}" error? This would let developers know that the error came
from within Sunspot, but only because the method they specified in the
DSL wasn't found.
Thanks again!
Jeff
On Nov 18, 8:14 am, Mat Brown <
m...@patch.com> wrote:
> All - I have a few thoughts on this that I'll send out once I get a
> chance to play around a bit more with Dmitriy's proposed solution -
> but please don't hesitate to join in this conversation!
>