wiki pages: convert other_names to array (#3987).

This commit is contained in:
evazion
2018-11-13 18:08:20 -06:00
parent b660aeefd7
commit 308a5021b4
9 changed files with 55 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
class WikiPageVersion < ApplicationRecord
array_attribute :other_names
belongs_to :wiki_page
belongs_to_updater
belongs_to :artist, optional: true
@@ -45,8 +46,4 @@ class WikiPageVersion < ApplicationRecord
def category_name
Tag.category_for(title)
end
def other_names_array
other_names.to_s.split(/[[:space:]]+/)
end
end