Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Rails 5.1 validation problems #16

Open

Description

@peterwake

@mcls @iangreenleaf just FYI I tried this gem with Rails 5.1, (and also with your new Rails 5.1 branch), and was getting ActiveRecord Validation failed errors on my models (which I don't get using the original). This is occuring where I had e.g.

belongs_to :communication

Which I could solve by adding

belongs_to :communication, optional: true

However for models where I have

class Communication < ApplicationRecord

  has_many :communications_stores

  has_many :stores, -> { distinct },
    through: :communications_stores

And I do

Communication.create(stores: stores)

It blew up. I couldn't work out how to stop it throwing the error in this case.

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