add options for modifying commentary/commentary_request tags on form #2623
This commit is contained in:
@@ -754,6 +754,14 @@ class Post < ActiveRecord::Base
|
||||
!!(tag_string =~ /(?:^| )(?:#{tag})(?:$| )/)
|
||||
end
|
||||
|
||||
def add_tag(tag)
|
||||
set_tag_string("#{tag_string} #{tag}")
|
||||
end
|
||||
|
||||
def remove_tag(tag)
|
||||
set_tag_string((tag_array - tag).join(" "))
|
||||
end
|
||||
|
||||
def has_dup_tag?
|
||||
has_tag?("duplicate")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user