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

Rails 5: Tagger is optional in Tagging relation. #720

Merged
merged 1 commit into from
Jul 5, 2016
Merged

Rails 5: Tagger is optional in Tagging relation. #720

merged 1 commit into from
Jul 5, 2016

Conversation

klacointe
Copy link
Contributor

@jaredcwhite
Copy link

I can confirm this resolves the ROLLBACK problem in Rails 5 when trying to save a model's tag list.

@query-string
Copy link

+1

@shlomizadok
Copy link

shlomizadok commented May 13, 2016

+1
(Tested, fixes the issue)

shlomizadok added a commit to shlomizadok/acts-as-taggable-on that referenced this pull request May 13, 2016
cireficc added a commit to cireficc/acts-as-taggable-on that referenced this pull request May 17, 2016
@cireficc
Copy link

Can this be merged? In the meantime, I've forked, applied the change to get it working, and am bundling my fork (with gem 'acts-as-taggable-on', github: 'cireficc/acts-as-taggable-on') instead of this repo. It works, but it's a temporary hack.

@rpazyaquian
Copy link

Any updates on this? It'd help a bunch.

@ygamretuta
Copy link

ygamretuta commented Jun 15, 2016

+1

for anyone lazy enough to not want to create a fork with just this 1-line fix, use mine:

gem 'acts-as-taggable-on', github: 'ygamretuta/acts-as-taggable-on'

you can just remove the github param once the author decides to merge OP's PR

brenthaas pushed a commit to brenthaas/acts-as-taggable-on that referenced this pull request Jun 16, 2016
emcoding added a commit to emcoding/acts-as-taggable-on that referenced this pull request Jul 4, 2016
@emcoding
Copy link

emcoding commented Jul 4, 2016

I created the fork on the latest master, and borrowed the oneliner from the posters above. Doesn't work for me. Did anyone got this working on the latest master?

Thanks y'all

@ everyone: you can use my fork; it is the latest master plus the oneliner provided by @klacointe
https://github.com/f3pix/acts-as-taggable-on

@seuros
Copy link
Collaborator

seuros commented Jul 5, 2016

thank you

@connorshea
Copy link

@seuros will this be pushed to RubyGems any time soon? Thanks for your work here :)

@cireficc
Copy link

@connorshea If you need the fix now, you can just point your Gemfile to use Github:

gem 'acts-as-taggable-on', github: 'mbleigh/acts-as-taggable-on'

and then go back to RubyGems when a new version is pushed.

@connorshea
Copy link

@cireficc we have a policy against it for security and stability reasons, so unfortunately that won't work.

@emcoding
Copy link

@connorshea Not sure what you mean. I point to the github master, because of the latest fixes, and it works allright.

@connorshea
Copy link

@F3PiX I mean the company I work for (GitLab)

@logicminds
Copy link

Is this in a released gem yet?

@connorshea
Copy link

@logicminds yeah it's in 4.0.0.

@lucascaton
Copy link

lucascaton commented Jul 14, 2019

Wouldn't this require a migration change as well? I'm saying that because t.references :tagger, polymorphic: true adds both tagger_type and tagger_id columns with null: false.

The following change (made on this migration) solved the issue I was having (null value in column "tagger_type" violates not-null constraint):

-      t.references :tagger, polymorphic: true
+      t.references :tagger, polymorphic: true, null: true

tekniklr pushed a commit to tekniklr/acts-as-taggable-on that referenced this pull request Mar 19, 2021
…_tagger

Rails 5: Tagger is optional in Tagging relation.
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

Successfully merging this pull request may close these issues.