質問

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top