I would not hack inside act-as-taggable-on, just create another method for the class that implements it:
class MyClass < ActiveRecord::Base
acts_as_taggable
def human_tag_list
self.tag_list.gsub(', ', ' ')
end
def human_tag_list= list_of_tags
self.tag_list = list_of_tags.gsub(' ', ',')
end
end
MyClass.get(1).tag_list
MyClass.get(1).human_tag_list
MyClass.get(1).human_tag_list = "tagone tagtwo tagthree"
source
share