M
Max Williams
I want to add a slightly hacky feature into my boolean mysql search
which lets users write 'foo and bar', which is then translated into
'+foo +bar' (ie both 'foo' and 'bar' must be present) before being
passed to the search. Similarly, "foo and bar and snafu" should be
translated into "+foo +bar +snafu".
I'm sure there must be a simple way to do this but i'm new to ruby and
have got bogged down in loads of nested ifs and exceptions already.
Can anyone help with an elegant solution?
thanks
max
which lets users write 'foo and bar', which is then translated into
'+foo +bar' (ie both 'foo' and 'bar' must be present) before being
passed to the search. Similarly, "foo and bar and snafu" should be
translated into "+foo +bar +snafu".
I'm sure there must be a simple way to do this but i'm new to ruby and
have got bogged down in loads of nested ifs and exceptions already.
Can anyone help with an elegant solution?
thanks
max