GithubHelp home page GithubHelp logo

Comments (5)

glebm avatar glebm commented on July 19, 2024

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 ?

from active_record_union.

glebm avatar glebm commented on July 19, 2024

@brianhempel I've improved the test harness in #10 to help with fixing this and making sure it doesn't break in the future.

from active_record_union.

glebm avatar glebm commented on July 19, 2024

Added support for Rails 5 in #10.

from active_record_union.

brianhempel avatar brianhempel commented on July 19, 2024

Fixed with the merger of #10 for Rails 5 compatibility. Available on RubyGems with v1.2.0.

from active_record_union.

glebm avatar glebm commented on July 19, 2024

Thanks 👍

from active_record_union.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.