acts-as-taggable-on icon indicating copy to clipboard operation
acts-as-taggable-on copied to clipboard

Bugfix dirty attributes handling for `tag_list=`.

Open lukeasrodgers opened this issue 8 years ago • 15 comments

tag_list was not being correctly marked as dirty if it was modified on a preexisting record. This was caused by two factors:

  • Inconsistent use of singular/vs plural tagging contexts.
  • #custom_contexts considered all contexts as custom, including those explicitly specified on the model.

lukeasrodgers avatar Feb 07 '16 00:02 lukeasrodgers

Actually, I think this fix may be incorrect, I'm going to close this PR until I can verify.

lukeasrodgers avatar Feb 08 '16 14:02 lukeasrodgers

Never mind, I think it's okay, I just ran into an unrelated bug with concat when testing this code.

lukeasrodgers avatar Feb 08 '16 16:02 lukeasrodgers

:+1:

klacointe avatar Apr 12 '16 13:04 klacointe

@mbleigh up?

klacointe avatar Dec 06 '16 15:12 klacointe

see #786 and #257 thanks for the fix

Skulli avatar Feb 24 '17 06:02 Skulli

Hey, thanks for the fix @lukeasrodgers ! What's the status of this one? We really need a fix on our application codebase :).

Also, it looks similar to #723 and #812.

Thanks a lot !

thromera avatar Jun 14 '17 16:06 thromera

@mbleigh up ?

klacointe avatar Jan 16 '18 10:01 klacointe

+1

travisofthenorth avatar Jul 05 '18 15:07 travisofthenorth

Is this the main pull/issue for *_list_changed? not working in rails 5? I dropped in a hack into the controller, but I would like to implement dirty inside model callbacks at some point.

I would love to help if I can. Please let me know if you have a grip on all the related issues/pulls that exist!

RudyOnRails avatar Jan 03 '19 19:01 RudyOnRails

Merged in master to fix merge conflicts. Failing specs are unrelated to changes here, seem to be due to the fact that bundler 2 requires ruby version >= 2.3.0 (https://bundler.io/blog/2019/01/03/announcing-bundler-2.html)

lukeasrodgers avatar Jan 04 '19 05:01 lukeasrodgers

bundler issue fixed in https://github.com/mbleigh/acts-as-taggable-on/pull/934, though @mbleigh you may prefer different solution (e.g. just drop testing ruby < 2.3)

lukeasrodgers avatar Jan 04 '19 06:01 lukeasrodgers

@RudyOnRails can you share your controller code workaround for this bug? Thanks!

ivanovv avatar Sep 03 '20 22:09 ivanovv

@RudyOnRails can you share your controller code workaround for this bug? Thanks!

Sorry @ivanovv - I can't find it ATM. If I remember where it was, I will post!

RudyOnRails avatar Sep 15 '20 20:09 RudyOnRails

What's the status of this? It seems still broken, isn't it?

@taggable.tag_list = ['one', 'two']
@taggable.skill_list = ['react', 'rails']
@taggable.save

only saves one of the two lists

apuntovanini avatar Sep 20 '21 20:09 apuntovanini

@seuros any clues on this? Thanks!

apuntovanini avatar Feb 04 '22 10:02 apuntovanini