Try to add if params[:tematica]...