Search code examples
ruby-on-railsacts-as-taggable-on

Multiple delimiters while using ActsAsTaggableOn gem


I am using ActsAsTaggableOn gem. How do I specify multiple delimiters for a tag list? I tried:

ActsAsTaggableOn::TagList.delimiter = [',', ' ', '\|']

But this gives an error:

ActionView::Template::Error (undefined method `ends_with?' for [",", " ", "\\|"]:Array)

Any help would be much appreciated.


Solution

  • Just set ActsAsTaggableOn.delimiter = [',', ' ', '\|']

    See here for more: https://github.com/mbleigh/acts-as-taggable-on#configuration