Skip to content

No column "flaggings_count" #20

Description

@MathieuRbrt

Good morning,
Whenever I try to make a user like a post (on the browser or console), it keeps showing me this error :

SQLite3::SQLException: no such column: flaggings_count: UPDATE "posts" SET "flaggings_count" = COALESCE("flaggings_count", 0) + 1 WHERE "posts"."id" = 67

Here's my like method :

def like
@post = Post.find(params[:id])
current_user.flag(@post, :like)
redirect_to posts_path, :notice => "You now like this post"
end

The migration looks ok, did it happen to anyone?
Thanks again for your gem!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions