You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the default delimiter creates an issue how tags are cached and returned when queried again
e.g
set the ActsAsTaggableOn.delimiter = ';'
create a new object that has taggable attribute
@taggable = CachedModel.new(name: 'Bob Jones')
update tag attribute
@taggable.update_attributes(tag_list: 'awesome; epic')
when queried for the tag_list returns
@taggable.tag_list
=> ["awesome", "epic"]
@taggable.cached_tag_list
=> "awesome, epic"
which is fine but when the object is retrieved again and queried the same the results are not as expected
@taggable = CachedModel.find_by_name('Bob Jones')
@taggable.tag_list
=> ["awesome, epic"]
@taggable.cached_tag_list
=> "awesome, epic"
As u can see the difference in tag_list from ["awesome", "epic"] to ["awesome, epic"] is the issue and investigating shows the problem is related to how the cached_tag_list is saved.
The text was updated successfully, but these errors were encountered:
keerthisiv
changed the title
Use of custom delimiter changes expected tag_list
Use of custom delimiter changes tag_list
Apr 16, 2016
Changing the default delimiter creates an issue how tags are cached and returned when queried again
e.g
set the ActsAsTaggableOn.delimiter = ';'
create a new object that has taggable attribute
@taggable = CachedModel.new(name: 'Bob Jones')
update tag attribute
@taggable.update_attributes(tag_list: 'awesome; epic')
when queried for the tag_list returns
@taggable.tag_list
=> ["awesome", "epic"]
@taggable.cached_tag_list
=> "awesome, epic"
which is fine but when the object is retrieved again and queried the same the results are not as expected
@taggable = CachedModel.find_by_name('Bob Jones')
@taggable.tag_list
=> ["awesome, epic"]
@taggable.cached_tag_list
=> "awesome, epic"
As u can see the difference in tag_list from ["awesome", "epic"] to ["awesome, epic"] is the issue and investigating shows the problem is related to how the cached_tag_list is saved.
The text was updated successfully, but these errors were encountered: