Skip to content

save_with_edgy hook causes sql exceptions #1

@choxi

Description

@choxi

I have one of the simpler configurations set up

User < ActiveRecord::Base
  acts_as_edgy :like, Like, Item
end

and when I create a new Like(with columns "user_id" and "item_id") I get this exception:

Exception in background thread: SQLite3::SQLException: no such column: users.item_id: SELECT  "users".* FROM "users" WHERE "users"."item_id" = 1 AND ("users"."id" >= 0) ORDER BY "users"."id" ASC LIMIT 1000

I think the Bridges are being constructed incorrectly in Edgy#edgy_build_connection because when I get here. the conditions hash is {:item_id => self.id}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions