mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.96k stars 1.2k forks source link

tag_list attribute is nil #1024

Open cromulus opened 3 years ago

cromulus commented 3 years ago

Hello! Rails 6.0 acts-as-taggable-on: 6.5.0

I have a taggable model, "Person", which I want to serialize to json. when I access tag_list as an attribute on an instance of "Person" seems to be empty, even though both the instance has been tagged and the cached_tag_list is up to date.

i.e.:

@person=Person.new()
@person.tag_list.add('foobar')
@person.save
attributes = @person.attributes
nil == attributes.tag_list # this is true
['foobar'] == @person.tag_list  # this is also true

Is this the expected behavior?

I'm a huge fan of this gem. Use it in almost all of my projects. Truly appreciate all of the work that goes into it. Thanks!

Merovex commented 3 years ago

Have you tried upgrading to 7.0.0?

mario-amazing commented 3 years ago

Have you tried upgrading to 7.0.0?

Same problem image

bcasci commented 1 year ago

Just confirming that this is an issue with v9 as well. I could possible find some time to look into it, assuming that these attributes should be present.