Just set ActsAsTaggableOn.delimiter = [',', ' ', '\|']
See here for more: https://github.com/mbleigh/acts-as-taggable-on#configuration
質問
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.
解決
Just set ActsAsTaggableOn.delimiter = [',', ' ', '\|']
See here for more: https://github.com/mbleigh/acts-as-taggable-on#configuration