Implentation for #2141

This commit is contained in:
Toks
2014-05-22 20:07:15 -04:00
parent 47f56cd19d
commit b18bb73f4b
14 changed files with 96 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ class WikiPageVersion < ActiveRecord::Base
belongs_to :wiki_page
belongs_to :updater, :class_name => "User"
belongs_to :artist
attr_accessible :wiki_page_id, :title, :body, :is_locked, :updater_id, :updater_ip_addr, :version
attr_accessible :wiki_page_id, :title, :body, :is_locked, :updater_id, :updater_ip_addr, :version, :other_names
module SearchMethods
def for_user(user_id)
@@ -43,4 +43,7 @@ class WikiPageVersion < ActiveRecord::Base
artist.blank? || !artist.is_banned? || CurrentUser.user.is_janitor?
end
def other_names_array
other_names.to_s.scan(/\S+/)
end
end