Changing the default delimiter with acts-as-taggable-on
问题 The default delimiter in the acts-as-taggable-on gem is a comma. I'd like to change this to a space throughout my Rails 3 application. For example, tag_list should be assigned like this: object.tag_list = "tagone tagtwo tagthree" rather than like this: object.tag_list = "tagone, tagtwo, tagthree" What is the best way to go about changing the delimiter? 回答1: You need define the delimiter class variable in ActsAsTaggableOn::TagList class In an initializer add that : ActsAsTaggableOn::TagList