Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work with active storage attachment #196

Open
lethunder opened this issue Jan 24, 2022 · 0 comments
Open

does not work with active storage attachment #196

lethunder opened this issue Jan 24, 2022 · 0 comments

Comments

@lethunder
Copy link

when adding acts_as_commontable to active storage attachment, commontator raise an error when adding picture to user for instance with

<ArgumentError: wrong number of arguments (given 3, expected 0)>

it happens at in lib/commontator/acts_as_commontable.rb line 27
validates :commontator_thread, presence: true, if: -> { Commontator::Thread.table_exists? }

i needed to add this
unless self.name == "ActiveStorage::Attachment"
validates :commontator_thread, presence: true, if: -> { Commontator::Thread.table_exists? }
end

to make it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant