mirror of
https://github.com/neocities/neocities.git
synced 2025-08-06 01:24:56 +02:00
follow/followings fixes, general cleanups
This commit is contained in:
parent
ad9ac1e68d
commit
264e4becea
6 changed files with 41 additions and 24 deletions
|
@ -1,3 +1,12 @@
|
|||
class Tag < Sequel::Model
|
||||
many_to_many :sites
|
||||
end
|
||||
|
||||
def before_create
|
||||
super
|
||||
values[:name].downcase!
|
||||
end
|
||||
|
||||
def self.create_unless_exists(name)
|
||||
dataset.filter(name: name).first || create(name: name)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue