Hi, Here is my simple text search code:
def search
@cart = find_cart
@products =Product.find(:all,
:conditions => ["title LIKE ? || body LIKE ? || maker LIKE ?", "%#{params [:search]}%", "%#{params[:search]}%", "%#{params[:search]}%"])
if @products.size ==0 flash[:notice] = "Please check the spelling " end
I would like to add an I18n.locale condition, something like:
:conditions => {:locale => I18n.locale}
but I can't get anything working. How should I do ?
Thanks a lot.