Created
May 11, 2020 22:00
-
-
Save staycreativedesign/36dfb492ee450802e3558d79a014ed96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document(#70259050585960) expected, got "" which is an instance of String(#70259013172680) | |
class Notification < ApplicationRecord | |
has_and_belongs_to_many :documents | |
has_many :users | |
has_many :marketers | |
end | |
class Document < ApplicationRecord | |
belongs_to :document_category | |
has_one_attached :file | |
has_and_belongs_to_many :notifications | |
end | |
class NotificationsDocuments < ApplicationRecord | |
belongs_to :document | |
belongs_to :notification | |
end | |
= f.select(:documents, options_from_collection_for_select(Document.all, 'id', 'name', f.object.documents), {}, multiple: true, class: 'select2 form-control') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment