mirror of
https://github.com/neocities/neocities.git
synced 2025-07-23 19:10:40 +02:00
api/info
This commit is contained in:
parent
7cd7973144
commit
d8da8de5b3
4 changed files with 127 additions and 32 deletions
|
@ -73,10 +73,11 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def new_tags=(tags_string)
|
||||
tags_string.gsub! /[^a-zA-Z0-9, ]/, ''
|
||||
tags_string.gsub! ', ', ','
|
||||
tags = tags_string.split ','
|
||||
tags_string.gsub! /[^a-zA-Z0-9, ]/, ''
|
||||
tags.collect! {|c| (c.match(/^\w+\s\w+/) || c.match(/^\w+/)).to_s }
|
||||
@new_tag_strings = tags
|
||||
@new_tag_strings = tags.sort
|
||||
end
|
||||
|
||||
def before_validation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue