Closed glebm closed 8 years ago
After replacing the call to visitor
with connection.visitor
in union.rb:31, I get another error:
Failure/Error: topics.map { |topic| new(user, topic) }
ActiveRecord::StatementInvalid: SQLite3::MismatchException: datatype mismatch: SELECT "thredded_topics".* FROM ( SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."messageboard_id" = ? AND ("thredded_topics"."title" COLLATE NOCASE LIKE '%rando%') AND ("thredded_topics"."title" COLLATE NOCASE LIKE '%thread%') UNION SELECT "thredded_topics".* FROM "thredded_topics" INNER JOIN "thredded_posts" ON "thredded_posts"."postable_id" = "thredded_topics"."id" WHERE "thredded_topics"."messageboard_id" = ? AND ("thredded_posts"."content" COLLATE NOCASE LIKE '%rando%') AND ("thredded_posts"."content" COLLATE NOCASE LIKE '%thread%') ) "thredded_topics" ORDER BY "thredded_topics"."updated_at" DESC, "thredded_topics"."id" DESC LIMIT ? OFFSET ?
@brianhempel I've improved the test harness in #10 to help with fixing this and making sure it doesn't break in the future.
Added support for Rails 5 in #10.
Fixed with the merger of #10 for Rails 5 compatibility. Available on RubyGems with v1.2.0.
Thanks :+1:
https://travis-ci.org/thredded/thredded/jobs/121828657