Fix tag to remove ['0', '1'] from the form
This commit is contained in:
parent
e4594fb343
commit
795e135ac7
|
@ -46,7 +46,7 @@ module OrbitTag
|
||||||
|
|
||||||
def tags=(tag_ids)
|
def tags=(tag_ids)
|
||||||
tag_ids = [tag_ids].flatten
|
tag_ids = [tag_ids].flatten
|
||||||
tag_ids.delete('')
|
tag_ids.delete_if{|e| e.match(/^[0-1]$|^$/)}
|
||||||
ids = self.taggings.blank? ? [] : self.taggings.map{|t| t.tag.id}
|
ids = self.taggings.blank? ? [] : self.taggings.map{|t| t.tag.id}
|
||||||
tag_ids.each do |tag_id|
|
tag_ids.each do |tag_id|
|
||||||
unless ids.include? tag_id
|
unless ids.include? tag_id
|
||||||
|
|
Loading…
Reference in New Issue